1
0
mirror of synced 2024-11-28 08:00:49 +01:00
GC-local-server-rewrite/Application/DependencyInjection.cs

20 lines
623 B
C#
Raw Normal View History

using System.Reflection;
2023-02-09 10:25:42 +01:00
using Application.Common.Behaviours;
using Application.Game.Card;
using Application.Interfaces;
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<,>));
return services;
}
}