/// <summary> /// Merge two <see cref="RuleValidation"/> into one. /// </summary> /// <param name="source">The source object</param> public void Merge(RuleValidation source) { if (!source?.HasErrors() ?? false) { return; } if (!string.IsNullOrWhiteSpace(source.Message)) { Message = source.Message; } Errors.AddRange(source.Errors); }
public RuleException(RuleValidation rule) : this(rule.Message, rule) { }
public RuleException(string message, RuleValidation rule) : this(message, rule, null) { }