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