public ValidationException(ValidationError validationError)
     : this(validationError.ErrorCode, validationError.ErrorMessage)
 {
     this.Violations.Add(validationError);
 }
 public static ValidationException CreateException(ValidationError error)
 {
     return new ValidationException(error);
 }
 public ValidationException(ValidationError validationError)
     : this(validationError.ErrorCode, validationError.ErrorMessage)
 {
     this.Violations.Add(validationError);
 }
 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));
 }