Skip to content

Commit

Permalink
Replace ContainerBuilder.Update with Conversation.UpdateContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
pcostantini committed Jun 13, 2017
1 parent 3cf963f commit 09b5827
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions CSharp/demo-ContosoFlowers/ContosoFlowers/Global.asax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ protected void Application_Start()

private void RegisterBotDependencies()
{
var builder = new ContainerBuilder();

builder.RegisterModule(new ReflectionSurrogateModule());

builder.RegisterModule<ContosoFlowersModule>();

builder.RegisterControllers(typeof(WebApiApplication).Assembly);

builder.Update(Conversation.Container);
Conversation.UpdateContainer(builder =>
{
builder.RegisterModule(new ReflectionSurrogateModule());
builder.RegisterModule<ContosoFlowersModule>();
builder.RegisterControllers(typeof(WebApiApplication).Assembly);
});

DependencyResolver.SetResolver(new AutofacDependencyResolver(Conversation.Container));
}
Expand Down

0 comments on commit 09b5827

Please sign in to comment.