共用方式為


FileResultExecutorBase.WriteFileAsync 方法

定義

將 fileStream 的內容寫入回應本文。

protected:
 static System::Threading::Tasks::Task ^ WriteFileAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::IO::Stream ^ fileStream, Microsoft::Net::Http::Headers::RangeItemHeaderValue ^ range, long rangeLength);
protected static System.Threading.Tasks.Task WriteFileAsync (Microsoft.AspNetCore.Http.HttpContext context, System.IO.Stream fileStream, Microsoft.Net.Http.Headers.RangeItemHeaderValue range, long rangeLength);
protected static System.Threading.Tasks.Task WriteFileAsync (Microsoft.AspNetCore.Http.HttpContext context, System.IO.Stream fileStream, Microsoft.Net.Http.Headers.RangeItemHeaderValue? range, long rangeLength);
static member WriteFileAsync : Microsoft.AspNetCore.Http.HttpContext * System.IO.Stream * Microsoft.Net.Http.Headers.RangeItemHeaderValue * int64 -> System.Threading.Tasks.Task
Protected Shared Function WriteFileAsync (context As HttpContext, fileStream As Stream, range As RangeItemHeaderValue, rangeLength As Long) As Task

參數

fileStream
Stream

要寫入的 fileStream。

rangeLength
Int64

範圍長度。

傳回

非同步工作。

適用於