Dela via


InputFormatterContext Constructors

Definition

Overloads

InputFormatterContext(HttpContext, String, ModelStateDictionary, ModelMetadata, Func<Stream,Encoding,TextReader>)

Creates a new instance of InputFormatterContext.

InputFormatterContext(HttpContext, String, ModelStateDictionary, ModelMetadata, Func<Stream,Encoding,TextReader>, Boolean)

Creates a new instance of InputFormatterContext.

InputFormatterContext(HttpContext, String, ModelStateDictionary, ModelMetadata, Func<Stream,Encoding,TextReader>)

Source:
InputFormatterContext.cs
Source:
InputFormatterContext.cs
Source:
InputFormatterContext.cs

Creates a new instance of InputFormatterContext.

public:
 InputFormatterContext(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, System::String ^ modelName, Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, Func<System::IO::Stream ^, System::Text::Encoding ^, System::IO::TextReader ^> ^ readerFactory);
public InputFormatterContext (Microsoft.AspNetCore.Http.HttpContext httpContext, string modelName, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Func<System.IO.Stream,System.Text.Encoding,System.IO.TextReader> readerFactory);
new Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext : Microsoft.AspNetCore.Http.HttpContext * string * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * Func<System.IO.Stream, System.Text.Encoding, System.IO.TextReader> -> Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext
Public Sub New (httpContext As HttpContext, modelName As String, modelState As ModelStateDictionary, metadata As ModelMetadata, readerFactory As Func(Of Stream, Encoding, TextReader))

Parameters

httpContext
HttpContext

The HttpContext for the current operation.

modelName
String

The name of the model.

modelState
ModelStateDictionary

The ModelStateDictionary for recording errors.

metadata
ModelMetadata

The ModelMetadata of the model to deserialize.

readerFactory
Func<Stream,Encoding,TextReader>

A delegate which can create a TextReader for the request body.

Applies to

InputFormatterContext(HttpContext, String, ModelStateDictionary, ModelMetadata, Func<Stream,Encoding,TextReader>, Boolean)

Source:
InputFormatterContext.cs
Source:
InputFormatterContext.cs
Source:
InputFormatterContext.cs

Creates a new instance of InputFormatterContext.

public:
 InputFormatterContext(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, System::String ^ modelName, Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, Func<System::IO::Stream ^, System::Text::Encoding ^, System::IO::TextReader ^> ^ readerFactory, bool treatEmptyInputAsDefaultValue);
public InputFormatterContext (Microsoft.AspNetCore.Http.HttpContext httpContext, string modelName, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Func<System.IO.Stream,System.Text.Encoding,System.IO.TextReader> readerFactory, bool treatEmptyInputAsDefaultValue);
new Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext : Microsoft.AspNetCore.Http.HttpContext * string * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * Func<System.IO.Stream, System.Text.Encoding, System.IO.TextReader> * bool -> Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext
Public Sub New (httpContext As HttpContext, modelName As String, modelState As ModelStateDictionary, metadata As ModelMetadata, readerFactory As Func(Of Stream, Encoding, TextReader), treatEmptyInputAsDefaultValue As Boolean)

Parameters

httpContext
HttpContext

The HttpContext for the current operation.

modelName
String

The name of the model.

modelState
ModelStateDictionary

The ModelStateDictionary for recording errors.

metadata
ModelMetadata

The ModelMetadata of the model to deserialize.

readerFactory
Func<Stream,Encoding,TextReader>

A delegate which can create a TextReader for the request body.

treatEmptyInputAsDefaultValue
Boolean

A value for the TreatEmptyInputAsDefaultValue property.

Applies to