diff options
Diffstat (limited to 'DSACore/Models/Network/Group.cs')
-rw-r--r-- | DSACore/Models/Network/Group.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/DSACore/Models/Network/Group.cs b/DSACore/Models/Network/Group.cs new file mode 100644 index 0000000..efe12ee --- /dev/null +++ b/DSACore/Models/Network/Group.cs @@ -0,0 +1,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; } + } +}
\ No newline at end of file |