C# Class NContext.Extensions.AspNet.WebApi.ErrorHandling.HttpParameterValidationError

Defines validation-related errors.
Inheritance: NContext.ErrorHandling.ErrorBase
Show file Open project: PowerDMS/NContext

Public Methods

Method Description
RequiredParameterNotFoundInBody ( Type parameterType, String parameterName ) : HttpParameterValidationError

The required resource parameter '{0}' of type '{1}' could not be found within the request body for validation.

ValidationFailed ( String parameterName, Object requiredParameterValue, Object bodyPropertyValue ) : HttpParameterValidationError

The required resource parameter '{0}' with value '{1}' does not match the value set in the request body: '{2}'.

Private Methods

Method Description
HttpParameterValidationError ( String localizationKey, HttpStatusCode httpStatusCode, String code ) : System

Method Details

RequiredParameterNotFoundInBody() public static method

The required resource parameter '{0}' of type '{1}' could not be found within the request body for validation.
public static RequiredParameterNotFoundInBody ( Type parameterType, String parameterName ) : HttpParameterValidationError
parameterType System.Type Type of the parameter.
parameterName String Name of the parameter.
return HttpParameterValidationError

ValidationFailed() public static method

The required resource parameter '{0}' with value '{1}' does not match the value set in the request body: '{2}'.
public static ValidationFailed ( String parameterName, Object requiredParameterValue, Object bodyPropertyValue ) : HttpParameterValidationError
parameterName String Name of the parameter.
requiredParameterValue Object The required parameter value.
bodyPropertyValue Object The body property value.
return HttpParameterValidationError