Skip to content

Commit

Permalink
Update code excerpts in README.md files (microsoft#201)
Browse files Browse the repository at this point in the history
* Update README.md

This change updates the README.md of the core-CreateNewComversation sample to reflect changes made in the SurveyTriggerer.cs. The current version of SurveyTriggerer.cs uses IDialogTask instead of IDialogStack, and additionally, the original version contained a typo on line 53: `IDialogStack stack = stack = scope.Resolve<IDialogStack>();`

* Update README.md

Update code featured in README.md to match what's actually currently in the sample
  • Loading branch information
sphanley authored and JasonSowers committed Feb 16, 2018
1 parent 464e515 commit ed008de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions CSharp/core-CreateNewConversation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public static async Task StartSurvey(ConversationReference conversationReference
var botData = scope.Resolve<IBotData>();
await botData.LoadAsync(token);

// resolve the dialog stack
IDialogStack stack = stack = scope.Resolve<IDialogStack>();
// resolve the dialog task
IDialogTask task = scope.Resolve<IDialogTask>();

// make a dialog to push on the top of the stack
var child = scope.Resolve<SurveyDialog>();
Expand All @@ -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
{
Expand Down
18 changes: 9 additions & 9 deletions CSharp/core-CustomState/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();

var store = new DocumentDbBotDataStore(docDbServiceEndpoint, docDbEmulatorKey);
builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();

builder.Update(Conversation.Container);
});

GlobalConfiguration.Configure(WebApiConfig.Register);
}
Expand Down

0 comments on commit ed008de

Please sign in to comment.