1
0
mirror of synced 2024-11-30 17:04:28 +01:00
GC-local-server-rewrite/Application/DependencyInjection.cs
2023-02-09 17:25:42 +08:00

20 lines
623 B
C#

using System.Reflection;
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());
services.AddScoped<ICardDependencyAggregate, CardDependencyAggregate>();
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(UnhandledExceptionBehaviour<,>));
return services;
}
}