Esempio n. 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="propertyName">The name of the property this rule validates for. This may be blank.</param>
 /// <param name="brokenDescription">A description message to show if the rule has been broken.</param>
 /// <param name="ruleDelegate">A delegate that takes no parameters and returns a boolean value, used to validate the rule.</param>
 public SimpleValidationRule(string propertyName, string brokenDescription, SimpleRuleDelegate ruleDelegate) :
     base(propertyName, brokenDescription)
 {
     this.RuleDelegate = ruleDelegate;
 }
Esempio n. 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="propertyName">The name of the property this rule validates for. This may be blank.</param>
 /// <param name="brokenDescription">A description message to show if the rule has been broken.</param>
 /// <param name="ruleDelegate">A delegate that takes no parameters and returns a boolean value, used to validate the rule.</param>
 public SimpleRule(string propertyName, string brokenDescription, SimpleRuleDelegate ruleDelegate)
     : base(propertyName, brokenDescription)
 {
     this.RuleDelegate = ruleDelegate;
 }