示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValidationException"/> class.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="entityType">Type of the entity.</param>
 public ValidationException(Type entityType, string message)
     : base(message)
 {
     ValidationErrors = new ValidationError[] { };
     EntityType       = entityType;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValidationException"/> class.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="errors">The errors.</param>
 /// <param name="entityType">Type of the entity.</param>
 public ValidationException(Type entityType, string message)
 : base(message)
 {
     ValidationErrors = new ValidationError[] { };
     EntityType = entityType;
 }
示例#3
0
 /// <summary>
 /// Overriden. Compares if a <see cref="ValidationError"/> instance is equal to this
 /// <see cref="ValidationError"/> instance.
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public bool Equals(ValidationError obj)
 {
     return Equals(obj.EntityType, this.EntityType)
            && Equals(obj.PropertyName, this.PropertyName)
            && Equals(obj.Message, this.Message);
 }