示例#1
0
 /// <summary>
 ///     Removes the access rule.
 /// </summary>
 /// <param name="rule">The rule.</param>
 public virtual void RemoveAccessRule(AccessRuleBase rule)
 {
     if (_accessRules.Contains(rule))
     {
         _accessRules.Remove(rule);
         rule.AccessRights = null;
     }
 }
示例#2
0
 /// <summary>
 ///     Adds the access rule.
 /// </summary>
 /// <param name="rule">The rule.</param>
 public virtual void AddAccessRule(AccessRuleBase rule)
 {
     if (!_accessRules.Contains(rule))
     {
         _accessRules.Add(rule);
         rule.AccessRights = this;
     }
 }