共用方式為


StringOutputFormatter.WriteResponseBodyAsync 方法

定義

寫入回應本文。

public:
 override System::Threading::Tasks::Task ^ WriteResponseBodyAsync(Microsoft::AspNetCore::Mvc::Formatters::OutputFormatterWriteContext ^ context, System::Text::Encoding ^ encoding);
public override System.Threading.Tasks.Task WriteResponseBodyAsync (Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding encoding);
override this.WriteResponseBodyAsync : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext * System.Text.Encoding -> System.Threading.Tasks.Task
Public Overrides Function WriteResponseBodyAsync (context As OutputFormatterWriteContext, encoding As Encoding) As Task

參數

context
OutputFormatterWriteContext

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

encoding
Encoding

傳回

可寫入回應本文的工作。

適用於