共用方式為


InputFormatterContext 建構函式

定義

多載

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

建立 InputFormatterContext 的新執行個體。

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

建立 InputFormatterContext 的新執行個體。

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

來源:
InputFormatterContext.cs
來源:
InputFormatterContext.cs
來源:
InputFormatterContext.cs

建立 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))

參數

httpContext
HttpContext

目前作業的 HttpContext

modelName
String

模型的名稱。

modelState
ModelStateDictionary

ModelStateDictionary用於記錄錯誤的 。

metadata
ModelMetadata

ModelMetadata要還原序列化之模型的 。

readerFactory
Func<Stream,Encoding,TextReader>

委派,可建立 TextReader 要求主體的 。

適用於

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

來源:
InputFormatterContext.cs
來源:
InputFormatterContext.cs
來源:
InputFormatterContext.cs

建立 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)

參數

httpContext
HttpContext

目前作業的 HttpContext

modelName
String

模型的名稱。

modelState
ModelStateDictionary

ModelStateDictionary用於記錄錯誤的 。

metadata
ModelMetadata

ModelMetadata要還原序列化之模型的 。

readerFactory
Func<Stream,Encoding,TextReader>

委派,可建立 TextReader 要求主體的 。

treatEmptyInputAsDefaultValue
Boolean

TreatEmptyInputAsDefaultValue 屬性的值。

適用於