Files
asesidaa_GC-local-server-re…/Application/DependencyInjection.cs
T
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;
}
}