InputFormatterContext Class¶
Summary¶
A context object used by an input formatter for deserializing the request body into an object.
Constructors¶
-
InputFormatterContext
(HttpContext, Microsoft.AspNet.Mvc.ModelBinding.ModelStateDictionary, System.Type)¶ Creates a new instance of [Microsoft.AspNet.Mvc.InputFormatterContext](Microsoft.AspNet.Mvc.InputFormatterContext.yml).
Arguments: - httpContext (HttpContext) – The @!:Http.HttpContext- for the current operation.
- modelState (Microsoft.AspNet.Mvc.ModelBinding.ModelStateDictionary) – The [Microsoft.AspNet.Mvc.ModelBinding.ModelStateDictionary](Microsoft.AspNet.Mvc.ModelBinding.ModelStateDictionary.yml) for recording errors.
- modelType (System.Type) – The [System.Type]() of the model to deserialize.
public InputFormatterContext(HttpContext httpContext, ModelStateDictionary modelState, Type modelType)
-
Properties¶
-
HttpContext
()¶ Gets the @!:Http.HttpContext- associated with the current operation.
Return type: HttpContext public HttpContext HttpContext { get; }
-
ModelState
()¶ Gets the [Microsoft.AspNet.Mvc.ModelBinding.ModelStateDictionary](Microsoft.AspNet.Mvc.ModelBinding.ModelStateDictionary.yml) associated with the current operation.
Return type: Microsoft.AspNet.Mvc.ModelBinding.ModelStateDictionary public ModelStateDictionary ModelState { get; }
-
ModelType
()¶ Gets the expected [System.Type]() of the model represented by the request body.
Return type: System.Type public Type ModelType { get; }
-