-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathDialogsInputBotComponent.cs
More file actions
23 lines (21 loc) · 1.09 KB
/
DialogsInputBotComponent.cs
File metadata and controls
23 lines (21 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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<MultiSelectChoiceInput>(MultiSelectChoiceInput.Kind));
services.AddSingleton<JsonConverterFactory, JsonConverterFactory<ObjectExpressionConverter<object>>>();
}
}
}