Object representing a validation rule for an object
コード例 #1
0
 /// <summary>
 /// Removes a broken rule from the list
 /// </summary>
 /// <param name="rule"><see cref="ValidationRuleInfo"/> object containing the details about the rule.</param>
 internal void Remove(ValidationRuleInfo rule)
 {
     for (int index = Count - 1; index >= 0; index--)
     {
         if (this[index].RuleName == rule.RuleName)
         {
             RemoveAt(index);
             break;
         }
     }
 }
コード例 #2
0
ファイル: BrokenRule.cs プロジェクト: reachshankar82/netTiers
 /// <summary>
 /// Creates a instance of the object.
 /// </summary>
 /// <param name="rule"><see cref="ValidationRuleInfo"/> containing the details about the rule that was broken.</param>
 internal BrokenRule(ValidationRuleInfo rule)
 {
     _ruleName    = rule.RuleName;
     _description = rule.ValidationRuleArgs.Description;
     _property    = rule.ValidationRuleArgs.PropertyName;
 }
コード例 #3
0
 /// <summary>
 /// Add a broken rule to the list
 /// </summary>
 /// <param name="rule"><see cref="ValidationRuleInfo"/> object containing the details about the rule.</param>
 internal void Add(ValidationRuleInfo rule)
 {
     Remove(rule);
     Add(new BrokenRule(rule));
 }
コード例 #4
0
ファイル: BrokenRule.cs プロジェクト: WildGenie/NetTiers
 /// <summary>
 /// Creates a instance of the object.
 /// </summary>
 /// <param name="rule"><see cref="ValidationRuleInfo"/> containing the details about the rule that was broken.</param>
 internal BrokenRule(ValidationRuleInfo rule)
 {
    _ruleName = rule.RuleName;
    _description = rule.ValidationRuleArgs.Description;
    _property = rule.ValidationRuleArgs.PropertyName;
 }