using Microsoft.Extensions.DependencyInjection;
using NetworkResurrector.Api.Application.Services;
using NetworkResurrector.Api.Application.Services.Abstractions;
using NetworkResurrector.Api.Application.Services.Decorators;

namespace NetworkResurrector.Api.Application
{
    public static class DependencyInjectionExtensions
    {
        public static void AddApplicationServices(this IServiceCollection services)
        {
            services.AddSingleton<INotificationService, NotificationService>();
            services.AddScoped<IUserContext, UserContext>();
            services.Decorate<IUserContext, UserContextCache>();
            services.AddScoped<IUserService, UserService>();
        }
    }
}
