AttachmentsExtensions.GetAttachmentAsync 方法

定义

GetAttachment。

public static System.Threading.Tasks.Task<byte[]> GetAttachmentAsync (this Microsoft.Bot.Connector.IAttachments operations, string attachmentId, string viewId, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<System.IO.Stream> GetAttachmentAsync (this Microsoft.Bot.Connector.IAttachments operations, string attachmentId, string viewId, System.Threading.CancellationToken cancellationToken = default);
static member GetAttachmentAsync : Microsoft.Bot.Connector.IAttachments * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<byte[]>
static member GetAttachmentAsync : Microsoft.Bot.Connector.IAttachments * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
<Extension()>
Public Function GetAttachmentAsync (operations As IAttachments, attachmentId As String, viewId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Byte())
<Extension()>
Public Function GetAttachmentAsync (operations As IAttachments, attachmentId As String, viewId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Stream)

参数

operations
IAttachments

此扩展方法的操作组。

attachmentId
String

附件 ID。

viewId
String

attachmentInfo 中的视图 ID。

cancellationToken
CancellationToken

取消标记。

返回

Task<Byte[]>

作为 Stream 的附件。

注解

获取二进制内容的命名视图。

适用于