OutputFormatterWriteContext 构造函数

定义

创建一个新的 OutputFormatterWriteContext

public:
 OutputFormatterWriteContext(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Func<System::IO::Stream ^, System::Text::Encoding ^, System::IO::TextWriter ^> ^ writerFactory, Type ^ objectType, System::Object ^ object);
public OutputFormatterWriteContext (Microsoft.AspNetCore.Http.HttpContext httpContext, Func<System.IO.Stream,System.Text.Encoding,System.IO.TextWriter> writerFactory, Type objectType, object object);
public OutputFormatterWriteContext (Microsoft.AspNetCore.Http.HttpContext httpContext, Func<System.IO.Stream,System.Text.Encoding,System.IO.TextWriter> writerFactory, Type? objectType, object? object);
new Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext : Microsoft.AspNetCore.Http.HttpContext * Func<System.IO.Stream, System.Text.Encoding, System.IO.TextWriter> * Type * obj -> Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext
Public Sub New (httpContext As HttpContext, writerFactory As Func(Of Stream, Encoding, TextWriter), objectType As Type, object As Object)

参数

httpContext
HttpContext

当前请求的 HttpContext

writerFactory
Func<Stream,Encoding,TextWriter>

用于创建 TextWriter 用于写入响应的委托。

objectType
Type

Type要写入响应的 对象的 。

object
Object

要写入响应的对象。

适用于