語言

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

從附件資訊中查看ID。

cancellationToken
CancellationToken

取消權杖。

傳回

Task<Byte[]>

作為一條溪流的附著。

備註

取得具名檢視做為二進位內容。

適用於