StreamOutputFormatter.CanWriteResult(OutputFormatterCanWriteContext) 方法

定义

确定这 IOutputFormatter 是否可以序列化指定类型的对象。

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

参数

context
OutputFormatterCanWriteContext

与调用关联的格式化程序上下文。

返回

true如果格式化程序可以写入响应,则返回 ;false否则返回 。

实现

适用于