ConversationState.GetStorageKey(ITurnContext) 方法

定义

获取在读取和写入存储以及从存储中写入状态时要使用的密钥。

protected override string GetStorageKey (Microsoft.Bot.Builder.ITurnContext turnContext);
override this.GetStorageKey : Microsoft.Bot.Builder.ITurnContext -> string
Protected Overrides Function GetStorageKey (turnContext As ITurnContext) As String

参数

turnContext
ITurnContext

此轮次的上下文对象。

返回

存储密钥。

例外

Activity当前轮次的 缺失ChannelIdConversation信息,或会话的 Id 缺失。

注解

会话状态包括通道 ID 和会话 ID 作为其存储密钥的一部分。

适用于