Compartir a través de


InputFormatterContext Constructores

Definición

Sobrecargas

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

Crea una nueva instancia de InputFormatterContext.

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

Crea una nueva instancia de InputFormatterContext.

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

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

Crea una nueva instancia de 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))

Parámetros

httpContext
HttpContext

HttpContext para la operación actual.

modelName
String

Nombre del modelo

modelState
ModelStateDictionary

para ModelStateDictionary registrar errores.

metadata
ModelMetadata

del ModelMetadata modelo que se va a deserializar.

readerFactory
Func<Stream,Encoding,TextReader>

Delegado que puede crear un TextReader para el cuerpo de la solicitud.

Se aplica a

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

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

Crea una nueva instancia de 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)

Parámetros

httpContext
HttpContext

HttpContext para la operación actual.

modelName
String

Nombre del modelo

modelState
ModelStateDictionary

para ModelStateDictionary registrar errores.

metadata
ModelMetadata

del ModelMetadata modelo que se va a deserializar.

readerFactory
Func<Stream,Encoding,TextReader>

Delegado que puede crear un TextReader para el cuerpo de la solicitud.

treatEmptyInputAsDefaultValue
Boolean

Valor de la propiedad TreatEmptyInputAsDefaultValue.

Se aplica a