StringOutputFormatter 类  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于 TextOutputFormatter 简单文本内容的 。
public ref class StringOutputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextOutputFormatterpublic class StringOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormattertype StringOutputFormatter = class
    inherit TextOutputFormatterPublic Class StringOutputFormatter
Inherits TextOutputFormatter- 继承
构造函数
| StringOutputFormatter() | 创建仅支持编码为 UTF8 或 Unicode的纯文本的新StringOutputFormatter。 | 
属性
| SupportedEncodings | 获取此 TextOutputFormatter支持的字符编码的可变集合。 编写数据时使用编码。(继承自 TextOutputFormatter) | 
| SupportedMediaTypes | 获取此 OutputFormatter支持的媒体类型元素的可变集合。(继承自 OutputFormatter) | 
方法
| CanWriteResult(OutputFormatterCanWriteContext) | 验证要格式化的对象是否为 ,  | 
| CanWriteType(Type) | 返回一个值,该值指示此序列化程序是否可以写入给定类型。(继承自 OutputFormatter) | 
| GetSupportedContentTypes(String, Type) | 获取 和  | 
| SelectCharacterEncoding(OutputFormatterWriteContext) | 根据提供的内容类型,确定用于读取或写入 HTTP 实体正文的受支持编码中的最佳 Encoding 类型。(继承自 TextOutputFormatter) | 
| WriteAsync(OutputFormatterWriteContext) | 写入 由  | 
| WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding) | 写入响应正文。 | 
| WriteResponseBodyAsync(OutputFormatterWriteContext) | 写入响应正文。(继承自 TextOutputFormatter) | 
| WriteResponseHeaders(OutputFormatterWriteContext) | 设置 对象上的 HttpResponse 标头。(继承自 OutputFormatter) |