Files
modernkeepass/ModernKeePass.Application/DependencyInjection.cs

21 lines
677 B
C#
Raw Normal View History

using System.Reflection;
using FluentValidation;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using ModernKeePass.Application.Common.Behaviors;
namespace ModernKeePass.Application
{
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services)
{
var assembly = typeof(DependencyInjection).GetTypeInfo().Assembly;
services.AddMediatR(assembly);
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(SetDirtyBehavior<,>));
//services.AddValidatorsFromAssembly(assembly);
return services;
}
}
}