BotState(IStorage, String) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 BotState 類別的新執行個體。
public BotState(Microsoft.Bot.Builder.IStorage storage, string contextServiceKey);
new Microsoft.Bot.Builder.BotState : Microsoft.Bot.Builder.IStorage * string -> Microsoft.Bot.Builder.BotState
Public Sub New (storage As IStorage, contextServiceKey As String)
參數
- storage
- IStorage
這個狀態管理物件會用來儲存和檢索狀態的儲存層。
例外狀況
storage 或 contextServiceKey 為 null。
備註
此建構函式會建立狀態管理對象和相關聯的範圍。 物件使用 storage 以持久化狀態屬性值。 物件在上下文中每回合使用 contextServiceKey to cache 狀態。