語言

StorageExtensions.ReadAsync<TStoreItem> 方法

定義

從狀態儲存中取得並強型輸入一組 IStoreItem 物件。

public static System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string,TStoreItem>> ReadAsync<TStoreItem>(this Microsoft.Bot.Builder.IStorage storage, string[] keys, System.Threading.CancellationToken cancellationToken = default) where TStoreItem : class;
static member ReadAsync : Microsoft.Bot.Builder.IStorage * string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string, 'StoreItem>> (requires 'StoreItem : null)
<Extension()>
Public Function ReadAsync(Of TStoreItem As Class) (storage As IStorage, keys As String(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDictionary(Of String, TStoreItem))

類型參數

TStoreItem

從倉庫拿出的物品類型。

參數

storage
IStorage

州儲存。

keys
String[]

物件從儲存空間取得的鑰匙集合。

cancellationToken
CancellationToken

一種可被其他物件或執行緒用來接收取消通知的取消標記。

傳回

Task<IDictionary<String,TStoreItem>>

工作,表示要執行的工作佇列。

備註

若任務成功完成,結果包含強型別物件的字典,並以 為索引 keys。

適用於