Пример #1
0
 internal void Add(RuleMethod rule)
 {
     Remove(rule);
     IsReadOnly = false;
     Add(new BrokenRule(rule));
     IsReadOnly = true;
 }
Пример #2
0
 internal void Remove(RuleMethod rule)
 {
     // we loop through using a numeric counter because
     // removing items within a foreach isn't reliable
     IsReadOnly = false;
     for (int index = 0; index < Count; index++)
     {
         if (this[index].RuleName == rule.RuleName)
         {
             RemoveAt(index);
             break;
         }
     }
     IsReadOnly = true;
 }
Пример #3
0
 internal BrokenRule(RuleMethod rule)
 {
     _ruleName    = rule.RuleName;
     _description = rule.RuleArgs.Description;
     _property    = rule.RuleArgs.PropertyName;
 }