blob: efe12ee502662201f0fd088c018b6a9354983d4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
using System;
using System.Collections.Generic;
namespace DSACore.Models.Network
{
public class Group
{
public Group(string name, string password)
{
Name = name;
Password = password;
}
public Group(string name, int userOnline)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
}
public string Name { get; set; }
public string Password { get; set; }
public List<User> Users { get; set; } = new List<User>();
public int UserCount => Users.Count;
public SendGroup SendGroup()
{
return new SendGroup(Name, UserCount);
}
}
public class SendGroup
{
public SendGroup(string name, int userCount)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
UserCount = userCount;
}
public string Name { get; set; }
public int UserCount { get; set; }
}
}
|