Partager via


InputFormatterContext Constructeurs

Définition

Surcharges

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

Crée une instance de InputFormatterContext.

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

Crée une instance de InputFormatterContext.

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

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

Crée une instance 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))

Paramètres

httpContext
HttpContext

HttpContext de l'opération actuelle.

modelName
String

Nom du modèle.

modelState
ModelStateDictionary

pour les ModelStateDictionary erreurs d’enregistrement.

metadata
ModelMetadata

ModelMetadata du modèle à désérialiser.

readerFactory
Func<Stream,Encoding,TextReader>

Délégué qui peut créer un TextReader pour le corps de la demande.

S’applique à

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

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

Crée une instance 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)

Paramètres

httpContext
HttpContext

HttpContext de l'opération actuelle.

modelName
String

Nom du modèle.

modelState
ModelStateDictionary

pour les ModelStateDictionary erreurs d’enregistrement.

metadata
ModelMetadata

ModelMetadata du modèle à désérialiser.

readerFactory
Func<Stream,Encoding,TextReader>

Délégué qui peut créer un TextReader pour le corps de la demande.

treatEmptyInputAsDefaultValue
Boolean

Valeur de la propriété TreatEmptyInputAsDefaultValue.

S’applique à