共用方式為


StringOutputFormatter.CanWriteResult(OutputFormatterCanWriteContext) 方法

定義

確認要格式化的物件是 , string 並繼續進行 的標準檢查 Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.CanWriteResult(OutputFormatterCanWriteContext)

public:
 override bool CanWriteResult(Microsoft::AspNetCore::Mvc::Formatters::OutputFormatterCanWriteContext ^ context);
public override bool CanWriteResult (Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context);
override this.CanWriteResult : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext -> bool
Public Overrides Function CanWriteResult (context As OutputFormatterCanWriteContext) As Boolean

參數

context
OutputFormatterCanWriteContext

與呼叫相關聯的格式器內容。

傳回

true如果格式器可以寫入回應,則傳回 , false 否則傳回 。

適用於