Exemplo n.º 1
0
        public override bool ValidateRule(NotifyValidationRule domainObject)
        {
            PropertyInfo pi = domainObject.GetType().GetProperty(this.PropertyName);
            Match        m  = Regex.Match(pi.GetValue(domainObject, null).ToString(), _regex);

            if (m.Success)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Validates that the rule has not been broken.
 /// </summary>
 /// <param name="domainObject">The domain object being validated.</param>
 /// <returns>True if the rule has not been broken, or false if it has.</returns>
 public override bool ValidateRule(NotifyValidationRule domainObject)
 {
     return(RuleDelegate());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Validates that the rule has been followed.
 /// </summary>
 public abstract bool ValidateRule(NotifyValidationRule domainObject);