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否则返回 。

适用于