/// <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);
        }
Beispiel #2
0
 public RuleException(RuleValidation rule) : this(rule.Message, rule)
 {
 }
Beispiel #3
0
 public RuleException(string message, RuleValidation rule) : this(message, rule, null)
 {
 }