Last active
December 29, 2017 07:36
-
-
Save r4hulp/fae62e51980a4584e4bd0c284916a19b to your computer and use it in GitHub Desktop.
Resolve DataStore scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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