Example #1
0
 /// <summary>
 /// Constructs a new validation exception
 /// </summary>
 /// <param name="sourceType">The source type</param>
 /// <param name="member">The member</param>
 /// <param name="source">The source attribute</param>
 /// <param name="message">The validation message</param>
 public ValidationException(Type sourceType, System.Reflection.MemberInfo member, ValidationBaseAttribute source, string message)
     : base(message)
 {
     SourceType      = sourceType ?? throw new ArgumentNullException(nameof(sourceType));
     SourceAttribute = source ?? throw new ArgumentNullException(nameof(source));
     Member          = member ?? throw new ArgumentNullException(nameof(member));
 }
Example #2
0
 /// <summary>
 /// Constructs a new validation exception
 /// </summary>
 /// <param name="sourceType">The source type</param>
 /// <param name="source">The source attribute</param>
 /// <param name="message">The validation message</param>
 /// <param name="inner">The inner exception</param>
 public ValidationException(Type sourceType, ValidationBaseAttribute source, string message, System.Exception inner)
     : base(message, inner)
 {
     SourceType      = sourceType ?? throw new ArgumentNullException(nameof(sourceType));
     SourceAttribute = source ?? throw new ArgumentNullException(nameof(source));
 }
Example #3
0
 /// <summary>
 /// Constructs a new validation exception
 /// </summary>
 /// <param name="source">The source attribute</param>
 /// <param name="message">The validation message</param>
 public ValidationException(ValidationBaseAttribute source, string message)
     : base(message)
 {
     SourceAttribute = source ?? throw new ArgumentNullException(nameof(source));
 }