network-resurrector/NetworkResurrector.Application/DependencyInjectionExtensio...

25 lines
876 B
C#
Raw Normal View History

using Microsoft.Extensions.DependencyInjection;
using NetworkResurrector.Application.Services;
2020-07-10 00:29:39 +03:00
using NetworkResurrector.Application.Stores;
using NetworkResurrector.Domain.Services;
namespace NetworkResurrector.Application
{
public static class DependencyInjectionExtensions
{
public static void AddApplicationServices(this IServiceCollection services)
{
services.AddSingleton<IParamProvider, ParamProvider>();
2020-07-10 00:29:39 +03:00
services.AddStores();
2020-11-28 20:06:43 +02:00
services.AddSingleton<IValidationService, ValidationService>();
2020-11-28 17:03:50 +02:00
services.AddSingleton<IPingService, PingService>();
2020-11-28 20:06:43 +02:00
services.AddSingleton<IShutdownService, ShutdownService>();
2020-07-10 00:29:39 +03:00
}
private static void AddStores(this IServiceCollection services)
{
services.AddSingleton<ISecurityStore, SecurityStore>();
}
}
}