-
Notifications
You must be signed in to change notification settings - Fork 1
/
Global.asax.cs
36 lines (33 loc) · 1.03 KB
/
Global.asax.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
using Autofac;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Dialogs.Internals;
using Microsoft.Bot.Connector;
using Microsoft.Bot.Sample.AadV2Bot.Areas.Bot;
namespace Microsoft.Bot.Sample.AadV2Bot
{
public class WebApiApplication : System.Web.HttpApplication
{
private static readonly object Key_DataStore = new object();
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
AreaRegistration.RegisterAllAreas();
Conversation.UpdateContainer(
builder =>
{
var store = new InMemoryDataStore();
builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(Key_DataStore)
.AsSelf()
.SingleInstance();
});
}
}
}