forked from BotBuilderCommunity/botbuilder-community-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDialogsInputBotComponent.cs
31 lines (26 loc) · 1.64 KB
/
DialogsInputBotComponent.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
using AdaptiveExpressions.Converters;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs.Declarative;
using Microsoft.Bot.Builder.Dialogs.Declarative.Converters;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace Bot.Builder.Community.Components.Dialogs.Input
{
public class DialogsInputBotComponent : BotComponent
{
public override void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
services.AddSingleton<DeclarativeType>(new DeclarativeType<EmailInput>(EmailInput.Kind));
services.AddSingleton<DeclarativeType>(new DeclarativeType<PhoneNumberInput>(PhoneNumberInput.Kind));
services.AddSingleton<DeclarativeType>(new DeclarativeType<SocialMediaInput>(SocialMediaInput.Kind));
services.AddSingleton<DeclarativeType>(new DeclarativeType<NumberWithTypeInput>(NumberWithTypeInput.Kind));
services.AddSingleton<DeclarativeType>(new DeclarativeType<NumberWithUnitInput>(NumberWithUnitInput.Kind));
services.AddSingleton<DeclarativeType>(new DeclarativeType<InternetProtocolInput>(InternetProtocolInput.Kind));
services.AddSingleton<DeclarativeType>(new DeclarativeType<GuidInput>(GuidInput.Kind));
services.AddSingleton<DeclarativeType>(new DeclarativeType<TrueFalseInput>(TrueFalseInput.Kind));
services.AddSingleton<DeclarativeType>(
new DeclarativeType<MultiSelectChoiceInput>(MultiSelectChoiceInput.Kind));
services.AddSingleton<JsonConverterFactory, JsonConverterFactory<ObjectExpressionConverter<object>>>();
}
}
}