using Microsoft.Extensions.DependencyInjection;
using NetworkResurrector.Server.Application.Services;
using NetworkResurrector.Server.Application.Stores;
using NetworkResurrector.Server.Domain.Services;

namespace NetworkResurrector.Server.Application
{
    public static class DependencyInjectionExtensions
    {
        public static void AddApplicationServices(this IServiceCollection services)
        {
            services.AddSingleton<IParamProvider, ParamProvider>();
            services.AddStores();
            services.AddSingleton<IValidationService, ValidationService>();
            services.AddSingleton<IPingService, PingService>();
            services.AddSingleton<IShutdownService, ShutdownService>();
        }

        private static void AddStores(this IServiceCollection services)
        {
            services.AddSingleton<ISecurityStore, SecurityStore>();
        }
    }
}
