IHttpSendFileFeature.SendFileAsync 方法

定義

在回應本文中傳送要求的檔案。 這可能會略過 IHttpResponseFeature.Body Stream 。 回應可能包含多個寫入。

public:
 System::Threading::Tasks::Task ^ SendFileAsync(System::String ^ path, long offset, Nullable<long> count, System::Threading::CancellationToken cancellation);
public System.Threading.Tasks.Task SendFileAsync (string path, long offset, long? count, System.Threading.CancellationToken cancellation);
abstract member SendFileAsync : string * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SendFileAsync (path As String, offset As Long, count As Nullable(Of Long), cancellation As CancellationToken) As Task

參數

path
String

檔案的完整磁片路徑。

offset
Int64

要開始之檔案中的位移。

count
Nullable<Int64>

要傳送的位元組數目,或為 null 來傳送檔案的其餘部分。

cancellation
CancellationToken

CancellationToken 用來中止傳輸。

傳回

適用於