BotState(IStorage, String) 构造函数

定义

初始化 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

此状态管理对象将用于存储和检索状态的存储层。

contextServiceKey
String

BotState的状态缓存的键。

例外

storagecontextServiceKeynull

注解

此构造函数创建状态管理对象和关联的范围。 对象使用 storage 来保存状态属性值。 对象使用 contextServiceKey 来缓存每个轮次的上下文中的状态。

适用于

另请参阅