示例#1
0
文件: PCommand.cs 项目: SealedSun/prx
 /// <summary>
 ///     Adds the command to the supplied group (or groups).
 /// </summary>
 /// <param name = "additionalGroups">The group (or groups) to which to add the command.</param>
 public void AddToGroup(PCommandGroups additionalGroups)
 {
     _groups = _groups | additionalGroups;
 }
示例#2
0
文件: PCommand.cs 项目: SealedSun/prx
 /// <summary>
 ///     Removes the command from the supplied group (or groups)
 /// </summary>
 /// <param name = "groups">The group (or groups) from which to remove the command.</param>
 public void RemoveFromGroup(PCommandGroups groups)
 {
     _groups = _groups ^ (_groups & groups);
 }
示例#3
0
文件: PCommand.cs 项目: SealedSun/prx
 /// <summary>
 ///     Determines whether the command is a member of a particular group.
 /// </summary>
 /// <param name = "groups">The group (or groups) to test the command for.</param>
 /// <returns>True, if the command is a member of the supplied group (or all groups); false otherwise.</returns>
 public bool IsInGroup(PCommandGroups groups)
 {
     return (_groups & groups) == _groups;
     //If _groups contains groups, an AND operation won't alter it
 }