你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

NotificationMessagesClient.DownloadMediaToAsync 方法

定义

重载

DownloadMediaToAsync(String, Stream, CancellationToken)

DownloadMediaToAsync(String, Stream, CancellationToken)操作以异步方式下载指定的内容,并将内容写入 。destinationStream

DownloadMediaToAsync(String, String, CancellationToken)

DownloadMediaTo(String, String, CancellationToken)操作下载指定内容,并将内容写入 。destinationPath

DownloadMediaToAsync(String, Stream, CancellationToken)

Source:
NotificationMessagesClient.cs
Source:
NotificationMessagesClient.cs

DownloadMediaToAsync(String, Stream, CancellationToken)操作以异步方式下载指定的内容,并将内容写入 。destinationStream

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadMediaToAsync (string mediaContentId, System.IO.Stream destinationStream, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadMediaToAsync : string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadMediaToAsync : string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadMediaToAsync (mediaContentId As String, destinationStream As Stream, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

参数

mediaContentId
String

用户到企业消息事件中包含的媒体标识符。

destinationStream
Stream

一个 Stream ,用于将下载的内容写入到 。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

服务器返回错误。 有关从服务器返回的详细信息,请参阅 Message

适用于

DownloadMediaToAsync(String, String, CancellationToken)

Source:
NotificationMessagesClient.cs
Source:
NotificationMessagesClient.cs

DownloadMediaTo(String, String, CancellationToken)操作下载指定内容,并将内容写入 。destinationPath

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadMediaToAsync (string mediaContentId, string destinationPath, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadMediaToAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadMediaToAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadMediaToAsync (mediaContentId As String, destinationPath As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

参数

mediaContentId
String

用户到企业消息事件中包含的媒体标识符。

destinationPath
String

要向其写入下载内容的文件路径。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

服务器返回错误。 有关从服务器返回的详细信息,请参阅 Message

适用于