Skip to content

Instantly share code, notes, and snippets.

@r4hulp
Last active December 29, 2017 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r4hulp/fae62e51980a4584e4bd0c284916a19b to your computer and use it in GitHub Desktop.
Save r4hulp/fae62e51980a4584e4bd0c284916a19b to your computer and use it in GitHub Desktop.
Resolve DataStore scope
//In your dialog
Activity message = result as Activity;
//Create scope with respect to activity
using (var scope = DialogModule.BeginLifetimeScope(Conversation.Container, message))
{
//Resolve scope for IBotDataStore<BotData>
IBotDataStore<BotData> stateStore = scope.Resolve<IBotDataStore<BotData>>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment