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

SurveyModule.cs 1.0 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
  1. namespace CreateNewConversationBot
  2. {
  3. using Autofac;
  4. using Microsoft.Bot.Builder.Dialogs;
  5. using Microsoft.Bot.Builder.Dialogs.Internals;
  6. using Microsoft.Bot.Builder.Internals.Fibers;
  7. using Microsoft.Bot.Connector;
  8. public class SurveyModule : Module
  9. {
  10. protected override void Load(ContainerBuilder builder)
  11. {
  12. base.Load(builder);
  13. builder.RegisterType<CreateNewConversationDialog>().As<IDialog<object>>().InstancePerDependency();
  14. builder.Register((c, p) => new SurveyDialog()).AsSelf().InstancePerDependency();
  15. builder.RegisterType<SurveyScheduler>().Keyed<ISurveyScheduler>(FiberModule.Key_DoNotSerialize).AsImplementedInterfaces().SingleInstance();
  16. builder.Register(c => new SurveyService(c.Resolve<ISurveyScheduler>(), c.Resolve<ConversationReference>())).Keyed<ISurveyService>(FiberModule.Key_DoNotSerialize).AsImplementedInterfaces().InstancePerMatchingLifetimeScope(DialogModule.LifetimeScopeTag);
  17. }
  18. }
  19. }
Tip!

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

Comments

Loading...