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

ContosoFlowersDialogFactory.cs 1.1 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
  1. namespace ContosoFlowers.Dialogs
  2. {
  3. using System.Collections.Generic;
  4. using Autofac;
  5. using BotAssets;
  6. using BotAssets.Dialogs;
  7. using Microsoft.Bot.Builder.Internals.Fibers;
  8. public class ContosoFlowersDialogFactory : DialogFactory, IContosoFlowersDialogFactory
  9. {
  10. public ContosoFlowersDialogFactory(IComponentContext scope)
  11. : base(scope)
  12. {
  13. }
  14. public SavedAddressDialog CreateSavedAddressDialog(
  15. string prompt,
  16. string useSavedAddressPrompt,
  17. string saveAddressPrompt,
  18. IDictionary<string, string> savedAddresses,
  19. IEnumerable<string> saveOptionNames)
  20. {
  21. return this.Scope.Resolve<SavedAddressDialog>(
  22. new NamedParameter("prompt", prompt),
  23. new NamedParameter("useSavedAddressPrompt", useSavedAddressPrompt),
  24. new NamedParameter("saveAddressPrompt", saveAddressPrompt),
  25. TypedParameter.From(savedAddresses),
  26. TypedParameter.From(saveOptionNames));
  27. }
  28. }
  29. }
Tip!

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

Comments

Loading...