SendFileResponseExtensions.SendFileAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SendFileAsync(HttpResponse, IFileInfo, CancellationToken) |
使用 SendFile 延伸模組傳送給定的檔案。 |
SendFileAsync(HttpResponse, String, CancellationToken) |
使用 SendFile 延伸模組傳送給定的檔案。 |
SendFileAsync(HttpResponse, IFileInfo, Int64, Nullable<Int64>, CancellationToken) |
使用 SendFile 延伸模組傳送給定的檔案。 |
SendFileAsync(HttpResponse, String, Int64, Nullable<Int64>, CancellationToken) |
使用 SendFile 延伸模組傳送給定的檔案。 |
SendFileAsync(HttpResponse, IFileInfo, CancellationToken)
使用 SendFile 延伸模組傳送給定的檔案。
public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, Microsoft.Extensions.FileProviders.IFileInfo file, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * Microsoft.Extensions.FileProviders.IFileInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, file As IFileInfo, Optional cancellationToken As CancellationToken = Nothing) As Task
參數
- response
- HttpResponse
- file
- IFileInfo
檔案。
- cancellationToken
- CancellationToken
傳回
適用於
SendFileAsync(HttpResponse, String, CancellationToken)
使用 SendFile 延伸模組傳送給定的檔案。
public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, string fileName, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, fileName As String, Optional cancellationToken As CancellationToken = Nothing) As Task
參數
- response
- HttpResponse
- fileName
- String
檔案的完整路徑。
- cancellationToken
- CancellationToken
傳回
適用於
SendFileAsync(HttpResponse, IFileInfo, Int64, Nullable<Int64>, CancellationToken)
使用 SendFile 延伸模組傳送給定的檔案。
public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, Microsoft.Extensions.FileProviders.IFileInfo file, long offset, long? count, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * Microsoft.Extensions.FileProviders.IFileInfo * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, file As IFileInfo, offset As Long, count As Nullable(Of Long), Optional cancellationToken As CancellationToken = Nothing) As Task
參數
- response
- HttpResponse
- file
- IFileInfo
檔案。
- offset
- Int64
檔案中的位移。
- cancellationToken
- CancellationToken
傳回
適用於
SendFileAsync(HttpResponse, String, Int64, Nullable<Int64>, CancellationToken)
使用 SendFile 延伸模組傳送給定的檔案。
public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, string fileName, long offset, long? count, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * string * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, fileName As String, offset As Long, count As Nullable(Of Long), Optional cancellationToken As CancellationToken = Nothing) As Task
參數
- response
- HttpResponse
- fileName
- String
檔案的完整路徑。
- offset
- Int64
檔案中的位移。
- cancellationToken
- CancellationToken