persistence/DD.Persistence.Client/DependencyInjection.cs
Оля Бизюкова 6593acbc20
Some checks failed
Unit tests / test (push) Failing after 1m1s
Новая фабрика рефит-клиентов (RefitClientFactory).
Работает пока только для ChangeLog
2024-12-26 13:42:14 +05:00

29 lines
993 B
C#

using DD.Persistence.Client.Clients;
using DD.Persistence.Client.Clients.Interfaces;
using Microsoft.Extensions.DependencyInjection;
namespace DD.Persistence.Client;
/// <summary>
///
/// </summary>
public static class DependencyInjection
{
/// <summary>
///
/// </summary>
/// <param name="services"></param>
/// <returns></returns>
public static IServiceCollection AddPersistenceClients(this IServiceCollection services)
{
services.AddSingleton(typeof(IRefitClientFactory<>), typeof(RefitClientFactory<>));
services.AddTransient<IChangeLogClient, ChangeLogClient>();
//services.AddTransient<ISetpointClient, SetpointClient>();
//services.AddTransient<ISetpointClient, SetpointClient>();
//services.AddTransient<ISetpointClient, SetpointClient>();
//services.AddTransient<ISetpointClient, SetpointClient>();
//services.AddTransient<ISetpointClient, SetpointClient>();
return services;
}
}