使用Bot V4框架无法从privateConversationState获取内存存储数据

时间:2019-03-20 09:47:44

标签: botframework

我正在使用Bot Framework v4和模拟器v3

1)我将当前机器人步骤详细信息存储到MemoryStorage的PrivateConversationState中。

2)现在,我想从privateconversationstate中读取或获取当前步骤的详细信息。

我的代码如下:

var turnState = await _accessors.PrivateConversationData.GetAsync(turnContext,()=>new BotDataBag());

turnContext.TurnState.Add(BotAccessors.PrivateConversationDataPropertyName, await _accessors.PrivateConversationData.GetAsync(turnContext, () => new BotDataBag()));

所以turnState count = 0;意味着我没有从_accessors.PrivateConversationData得到任何当前步数据。

请帮助此如何获取PrivateConversationData。

0 个答案:

没有答案