- Notifications
You must be signed in to change notification settings - Fork 843
/
Copy pathDomainExtensions.cs
27 lines (24 loc) · 1.33 KB
/
DomainExtensions.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
// Copyright (c) Microsoft Corporation. All rights reserved.
namespaceMicrosoft.Teams.Samples.ConversationalTabs.Domain;
usingMicrosoft.Extensions.DependencyInjection;
usingMicrosoft.Teams.Samples.ConversationalTabs.Domain.Factories;
usingMicrosoft.Teams.Samples.ConversationalTabs.Domain.Models;
usingMicrosoft.Teams.Samples.ConversationalTabs.Domain.Services;
publicstaticclassDomainExtensions
{
/// <summary>
/// Adds the services that are available in this project to Dependency Injection.
/// Include this in your Startup.cs ConfigureServices if you need to access these services.
/// </summary>
/// <param name="services">Service collection.</param>
/// <returns>Service collections.</returns>
publicstaticIServiceCollectionAddDomainServices(thisIServiceCollectionservices)
{
services.AddSingleton<IConnectorClientFactory,ConnectorClientFactory>();
services.AddTransient<IBotService,BotService>();
services.AddTransient<IRepositoryObjectService<SupportDepartment,SupportDepartmentInput>,SupportDepartmentService>();
services.AddTransient<IRepositoryObjectService<MsTeamsBotData,MsTeamsBotData>,MsTeamsBotDataService>();
services.AddTransient<ISubEntityService<CustomerInquiry,CustomerInquiryInput>,CustomerInquiryService>();
returnservices;
}
}