Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Global.asax.cs 1.2 KB

You have to be logged in to leave a comment. Sign In
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
37
38
39
  1. namespace RealEstateBot
  2. {
  3. using System.Web;
  4. using System.Web.Http;
  5. using Autofac;
  6. using Microsoft.Azure.Search.Models;
  7. using Microsoft.Bot.Builder.Dialogs;
  8. using Microsoft.Bot.Builder.Internals.Fibers;
  9. using RealEstateBot.Dialogs;
  10. using Search.Azure.Services;
  11. using Search.Models;
  12. using Search.Services;
  13. public class WebApiApplication : HttpApplication
  14. {
  15. protected void Application_Start()
  16. {
  17. ContainerBuilder builder = new ContainerBuilder();
  18. builder.RegisterType<IntroDialog>()
  19. .As<IDialog<object>>()
  20. .InstancePerDependency();
  21. builder.RegisterType<RealEstateMapper>()
  22. .Keyed<IMapper<DocumentSearchResult, GenericSearchResult>>(FiberModule.Key_DoNotSerialize)
  23. .AsImplementedInterfaces()
  24. .SingleInstance();
  25. builder.RegisterType<AzureSearchClient>()
  26. .Keyed<ISearchClient>(FiberModule.Key_DoNotSerialize)
  27. .AsImplementedInterfaces()
  28. .SingleInstance();
  29. builder.Update(Conversation.Container);
  30. GlobalConfiguration.Configure(WebApiConfig.Register);
  31. }
  32. }
  33. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...