diff --git a/CSharp/core-CreateNewConversation/README.md b/CSharp/core-CreateNewConversation/README.md index 46ebb28a2c..439ceb7122 100644 --- a/CSharp/core-CreateNewConversation/README.md +++ b/CSharp/core-CreateNewConversation/README.md @@ -55,8 +55,8 @@ public static async Task StartSurvey(ConversationReference conversationReference var botData = scope.Resolve(); await botData.LoadAsync(token); - // resolve the dialog stack - IDialogStack stack = stack = scope.Resolve(); + // resolve the dialog task + IDialogTask task = scope.Resolve(); // make a dialog to push on the top of the stack var child = scope.Resolve(); @@ -68,10 +68,10 @@ public static async Task StartSurvey(ConversationReference conversationReference try { // put the interrupting dialog on the stack - stack.Call(interruption, null); + task.Call(interruption, null); // start running the interrupting dialog - await stack.PollAsync(token); + await task.PollAsync(token); } finally { diff --git a/CSharp/core-CustomState/README.md b/CSharp/core-CustomState/README.md index 8b0526681f..39f7138b3b 100644 --- a/CSharp/core-CustomState/README.md +++ b/CSharp/core-CustomState/README.md @@ -37,17 +37,17 @@ protected void Application_Start() Uri docDbServiceEndpoint = new Uri(ConfigurationManager.AppSettings["DocumentDbServiceEndpoint"]); string docDbEmulatorKey = ConfigurationManager.AppSettings["DocumentDbAuthKey"]; - var builder = new ContainerBuilder(); + Conversation.UpdateContainer(builder => + { + builder.RegisterModule(new AzureModule(Assembly.GetExecutingAssembly())); - builder.RegisterModule(new AzureModule(Assembly.GetExecutingAssembly())); + var store = new DocumentDbBotDataStore(docDbServiceEndpoint, docDbEmulatorKey); + builder.Register(c => store) + .Keyed>(AzureModule.Key_DataStore) + .AsSelf() + .SingleInstance(); - var store = new DocumentDbBotDataStore(docDbServiceEndpoint, docDbEmulatorKey); - builder.Register(c => store) - .Keyed>(AzureModule.Key_DataStore) - .AsSelf() - .SingleInstance(); - - builder.Update(Conversation.Container); + }); GlobalConfiguration.Configure(WebApiConfig.Register); }