using Microsoft.Extensions.DependencyInjection;
using NexusReader.Application.Mappings;

namespace NexusReader.Application;

public static class DependencyInjection
{
    public static IServiceCollection AddApplication(this IServiceCollection services)
    {
        services.AddMapsterConfiguration();
        services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly));

        return services;
    }

    public static System.Reflection.Assembly Assembly => typeof(DependencyInjection).Assembly;
}
