共用方式為


SendFileResponseExtensions.SendFileAsync 方法

定義

多載

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)

來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs

使用 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

CancellationToken

傳回

適用於

SendFileAsync(HttpResponse, String, CancellationToken)

來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs

使用 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

CancellationToken

傳回

適用於

SendFileAsync(HttpResponse, IFileInfo, Int64, Nullable<Int64>, CancellationToken)

來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs

使用 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

檔案中的位移。

count
Nullable<Int64>

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

cancellationToken
CancellationToken

傳回

適用於

SendFileAsync(HttpResponse, String, Int64, Nullable<Int64>, CancellationToken)

來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs
來源:
SendFileResponseExtensions.cs

使用 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

檔案中的位移。

count
Nullable<Int64>

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

cancellationToken
CancellationToken

傳回

適用於