2023-02-08 14:33:22 +01:00
|
|
|
|
using System.Reflection;
|
2023-02-09 10:25:42 +01:00
|
|
|
|
using Application.Common.Behaviours;
|
|
|
|
|
using Application.Game.Card;
|
|
|
|
|
using Application.Interfaces;
|
2023-02-08 14:33:22 +01:00
|
|
|
|
using MediatR;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace Application;
|
|
|
|
|
|
|
|
|
|
public static class DependencyInjection
|
|
|
|
|
{
|
|
|
|
|
public static IServiceCollection AddApplication(this IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.AddMediatR(Assembly.GetExecutingAssembly());
|
|
|
|
|
|
2023-02-09 10:25:42 +01:00
|
|
|
|
services.AddScoped<ICardDependencyAggregate, CardDependencyAggregate>();
|
|
|
|
|
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(UnhandledExceptionBehaviour<,>));
|
2023-02-08 14:33:22 +01:00
|
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
}
|