using System; using System.Collections.Generic; using System.Text; namespace ScrewTurn.Wiki.PluginFramework { /// /// Represents a group of users. /// public class UserGroup { /// /// The group name. /// protected string name; /// /// The group description. /// protected string description; /// /// The users in the group. /// protected string[] users = new string[0]; /// /// The provider that handles the user group. /// protected IUsersStorageProviderV30 provider; /// /// Initializes a new instance of the class. /// /// The name of the group. /// The description of the group. /// The Users Storage Provider that handles the user group. public UserGroup(string name, string description, IUsersStorageProviderV30 provider) { this.name = name; this.description = description; this.provider = provider; } /// /// Gets or sets the name of the user group. /// public string Name { get { return name; } set { name = value; } } /// /// Gets or sets the description of the group. /// public string Description { get { return description; } set { description = value; } } /// /// Gets or sets the users in the group. /// public string[] Users { get { return users; } set { users = value; } } /// /// Gets or sets the provider that handles the user group. /// public IUsersStorageProviderV30 Provider { get { return provider; } set { provider = value; } } } /// /// Implements a comparer for objects, using Name as parameter. /// public class UserGroupComparer : IComparer { /// /// Compares two objects, using Name as parameter. /// /// The first object. /// The second object. /// The comparison result. public int Compare(UserGroup x, UserGroup y) { return StringComparer.OrdinalIgnoreCase.Compare(x.Name, y.Name); } } }