예제 #1
0
 public ValidationException(ValidationError validationError)
     : this(validationError.ErrorCode, validationError.ErrorMessage)
 {
     this.Violations.Add(validationError);
 }
예제 #2
0
 public static ValidationException CreateException(ValidationError error)
 {
     return new ValidationException(error);
 }
 public ValidationException(ValidationError validationError)
     : this(validationError.ErrorCode, validationError.ErrorMessage)
 {
     this.Violations.Add(validationError);
 }
예제 #4
0
 public static ValidationException CreateException(string errorCode, string errorMessage, string fieldName)
 {
     var error = new ValidationError(errorCode, fieldName, errorMessage);
     return new ValidationException(new ValidationResult(new List<ValidationError> { error }));
 }
 public static ValidationException CreateException(ValidationError error)
 {
     return(new ValidationException(error));
 }