Files
modernkeepass/ModernKeePass.Application/DependencyInjection.cs
Geoffroy BONNEVILLE c62ed584dc New Breadcrumb user control
New Breadcrumb service
WIP icons and back button behavior
2020-06-09 20:18:17 +02:00

22 lines
786 B
C#

using System.Reflection;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using ModernKeePass.Application.Common.Behaviors;
using ModernKeePass.Application.Common.Interfaces;
using ModernKeePass.Application.Common.Services;
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.AddSingleton(typeof(IBreadcrumbService), typeof(BreadcrumbService));
return services;
}
}
}