Files
modernkeepass/ModernKeePass.Infrastructure/DependencyInjection.cs
Geoffroy BONNEVILLE e4bd788ed3 1st working version in clean arch
WIP Parent group mapping issues
2020-03-30 19:43:04 +02:00

25 lines
1.2 KiB
C#

using Microsoft.Extensions.DependencyInjection;
using ModernKeePass.Application.Common.Interfaces;
using ModernKeePass.Domain.Interfaces;
using ModernKeePass.Infrastructure.Common;
using ModernKeePass.Infrastructure.KeePass;
using ModernKeePass.Infrastructure.UWP;
namespace ModernKeePass.Infrastructure
{
public static class DependencyInjection
{
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
{
services.AddSingleton(typeof(IDatabaseProxy), typeof(KeePassDatabaseClient));
services.AddTransient(typeof(ICryptographyClient), typeof(KeePassCryptographyClient));
services.AddTransient(typeof(IPasswordProxy), typeof(KeePassPasswordClient));
/*services.AddTransient(typeof(IResourceProxy), typeof(UwpResourceClient));
services.AddTransient(typeof(ISettingsProxy), typeof(UwpSettingsClient));
services.AddTransient(typeof(IRecentProxy), typeof(UwpRecentFilesClient));*/
services.AddScoped(typeof(IFileProxy), typeof(StorageFileClient));
services.AddTransient(typeof(IDateTime), typeof(MachineDateTime));
return services;
}
}
}