mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
WIP Clean Architecture
Windows 8.1 App Uses keepasslib v2.44 (temporarily)
This commit is contained in:
25
ModernKeePass.Infrastucture.12/DependencyInjection.cs
Normal file
25
ModernKeePass.Infrastucture.12/DependencyInjection.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Autofac;
|
||||
using AutoMapper;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Infrastructure.KeePass;
|
||||
using ModernKeePass.Infrastructure.UWP;
|
||||
|
||||
namespace ModernKeePass.Infrastructure
|
||||
{
|
||||
public class DependencyInjection: Module
|
||||
{
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder.RegisterType<KeePassDatabaseClient>().As<IDatabaseProxy>().SingleInstance();
|
||||
builder.RegisterType<KeePassPasswordClient>().As<IPasswordProxy>().SingleInstance();
|
||||
builder.RegisterType<KeePassCryptographyClient>().As<ICryptographyClient>();
|
||||
builder.RegisterType<UwpSettingsClient>().As<ISettingsProxy>();
|
||||
builder.RegisterType<UwpResourceClient>().As<IResourceProxy>();
|
||||
builder.RegisterType<UwpRecentFilesClient>().As<IRecentProxy>();
|
||||
builder.RegisterType<StorageFileClient>().As<IFileProxy>();
|
||||
|
||||
// Register Automapper profiles
|
||||
builder.RegisterType<EntryMappingProfile>().As<Profile>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user