Exemple #1
0
 public RuleResult(Rule rule, RuleResultType resultType, string message)
 {
     Rule       = rule;
     ResultType = resultType;
     Message    = message;
 }
Exemple #2
0
        public static ICollection <RuleResult> AddInfo(this ICollection <RuleResult> results, Rule rule, string message)
        {
            var result = new RuleResult(rule, RuleResultType.Info, message);

            results.Add(result);
            return(results);
        }
Exemple #3
0
 internal static ICollection <RuleResult> AddErrors(
     this ICollection <RuleResult> results, object entity, Rule rule, ICollection <string> messages)
 {
     return((messages.Count == 0) ? results :
            results.AddError(rule, GetEntityName(entity) + String.Join("; ", messages)));
 }