OutputFormatter 類別

定義

將 物件寫入輸出資料流程。

public ref class OutputFormatter abstract : Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseTypeMetadataProvider, Microsoft::AspNetCore::Mvc::Formatters::IOutputFormatter
public abstract class OutputFormatter : Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseTypeMetadataProvider, Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter
type OutputFormatter = class
    interface IOutputFormatter
    interface IApiResponseTypeMetadataProvider
type OutputFormatter = class
    interface IApiResponseTypeMetadataProvider
    interface IOutputFormatter
Public MustInherit Class OutputFormatter
Implements IApiResponseTypeMetadataProvider, IOutputFormatter
繼承
OutputFormatter
衍生
實作

建構函式

OutputFormatter()

將 物件寫入輸出資料流程。

屬性

SupportedMediaTypes

取得這個 OutputFormatter 所支援的可變動媒體類型專案集合。

方法

CanWriteResult(OutputFormatterCanWriteContext)

判斷這 IOutputFormatter 是否可以序列化指定型別的物件。

CanWriteType(Type)

傳回值,指出這個序列化程式是否可以寫入指定的型別。

GetSupportedContentTypes(String, Type)

取得 和 支援的內容類型 IOutputFormatterobjectTypecontentType 篩選清單。

WriteAsync(OutputFormatterWriteContext)

寫入 物件,此物件是由 的 Object 屬性工作表示 context

WriteResponseBodyAsync(OutputFormatterWriteContext)

寫入回應本文。

WriteResponseHeaders(OutputFormatterWriteContext)

設定 物件上的 HttpResponse 標頭。

適用於