Files
modernkeepass/ModernKeePass.Application/DependencyInjection.cs
Geoffroy BONNEVILLE 8e06bf4bb0 Removed half-baked import feature for now
No views depend on services anymore
Dirty status fully handled by behavior
2020-04-27 11:14:29 +02:00

21 lines
680 B
C#

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(DirtyStatusBehavior<,>));
//services.AddValidatorsFromAssembly(assembly);
return services;
}
}
}