你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CallingServerClient.DownloadToAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
DownloadToAsync(Uri, Stream, ContentTransferOptions, CancellationToken) |
操作 DownloadToAsync(Uri, Stream, ContentTransferOptions, CancellationToken) 使用并行请求下载指定内容,并将内容写入 |
DownloadToAsync(Uri, String, ContentTransferOptions, CancellationToken) |
操作 DownloadToAsync(Uri, String, ContentTransferOptions, CancellationToken) 使用并行请求下载指定内容,并将内容写入 |
DownloadToAsync(Uri, Stream, ContentTransferOptions, CancellationToken)
- Source:
- CallingServerClient.cs
操作 DownloadToAsync(Uri, Stream, ContentTransferOptions, CancellationToken) 使用并行请求下载指定内容,并将内容写入 destinationStream
。
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (Uri sourceEndpoint, System.IO.Stream destinationStream, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadToAsync : Uri * System.IO.Stream * Azure.Communication.CallingServer.ContentTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : Uri * System.IO.Stream * Azure.Communication.CallingServer.ContentTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (sourceEndpoint As Uri, destinationStream As Stream, Optional transferOptions As ContentTransferOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
参数
- transferOptions
- ContentTransferOptions
可选 ContentTransferOptions ,用于配置并行传输行为。
- cancellationToken
- CancellationToken
可选 CancellationToken ,用于传播应取消操作的通知。
返回
描述 Response 操作的 。
注解
RequestFailedException如果失败,将引发 。
适用于
DownloadToAsync(Uri, String, ContentTransferOptions, CancellationToken)
- Source:
- CallingServerClient.cs
操作 DownloadToAsync(Uri, String, ContentTransferOptions, CancellationToken) 使用并行请求下载指定内容,并将内容写入 destinationPath
。
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (Uri sourceEndpoint, string destinationPath, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadToAsync : Uri * string * Azure.Communication.CallingServer.ContentTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : Uri * string * Azure.Communication.CallingServer.ContentTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (sourceEndpoint As Uri, destinationPath As String, Optional transferOptions As ContentTransferOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
参数
- destinationPath
- String
要向其写入下载内容的文件路径。
- transferOptions
- ContentTransferOptions
可选 ContentTransferOptions ,用于配置并行传输行为。
- cancellationToken
- CancellationToken
可选 CancellationToken ,用于传播应取消操作的通知。
返回
描述 Response 操作的 。
注解
RequestFailedException如果失败,将引发 。