Ejemplo n.º 1
0
 public RuleAttribute(Type ruleType)
 {
     if (typeof(Rule).IsAssignableFrom(ruleType))
     {
         Rule = (Rule)Activator.CreateInstance(ruleType);
     }
 }
Ejemplo n.º 2
0
 public ValidationMessage(Rule rule, params object[] formatArguments)
 {
     Type = rule.GetType();
     Severity = rule.Severity;
     Message = string.Format(CultureInfo.CurrentCulture, rule.MessageTemplate, formatArguments);
 }
Ejemplo n.º 3
0
 public ValidationMessage(Rule rule)
 {
     Type = rule.GetType();
     Severity = rule.Severity;
     Message = string.Empty;
 }