共用方式為


OutputFormatterWriteContext.WriterFactory 屬性

定義

取得或設定用來建立 TextWriter 將文字寫入回應的 委派。

Body直接寫入 以將二進位資料寫入回應。

public:  virtual property Func<System::IO::Stream ^, System::Text::Encoding ^, System::IO::TextWriter ^> ^ WriterFactory {  public:
Func<System::IO::Stream ^, System::Text::Encoding ^, System::IO::TextWriter ^> ^ get(); protected:
 void set(Func<System::IO::Stream ^, System::Text::Encoding ^, System::IO::TextWriter ^> ^ value); };
public virtual Func<System.IO.Stream,System.Text.Encoding,System.IO.TextWriter> WriterFactory { get; protected set; }
member this.WriterFactory : Func<System.IO.Stream, System.Text.Encoding, System.IO.TextWriter> with get, set
Public Overridable Property WriterFactory As Func(Of Stream, Encoding, TextWriter)

屬性值

備註

由這個委派建立的 會將 TextWriter 文字編碼並寫入 Body 資料流程。 呼叫此委派以建立 TextWriter ,以將文字輸出寫入回應資料流程。

若要實作將二進位資料寫入回應資料流程的格式器,請勿使用委派,而是改用 WriterFactoryBody

適用於