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
在每個回合的內容中快取狀態。