This commit is contained in:
TheXamlGuy
2024-04-30 20:46:47 +01:00
parent 2a4194ee22
commit 81f266d8c4
22 changed files with 296 additions and 162 deletions
+8 -6
View File
@@ -54,12 +54,17 @@ public partial class App : Application
{
args.AddServices(services =>
{
services.AddTransient<IKeyGenerator, KeyGenerator>();
services.AddTransient<IEncryptor, AesEncryptor>();
services.AddTransient<IDecryptor, AesDecryptor>();
services.AddTransient<IPasswordHasher, PasswordHasher>();
services.AddTransient<IKeyDeriver, KeyDeriver>();
services.AddTransient<IVaultFactory, VaultFactory>();
services.AddTransient<IVaultKeyGenerator, VaultKeyGenerator>();
services.AddTransient<IVaultStorage, VaultStorage>();
services.AddDbContextFactory<VaultDbContext>(args =>
{
args.UseSqlite();
@@ -69,9 +74,6 @@ public partial class App : Application
services.AddHandler<OpenVaultHandler>();
services.AddHandler<CreateVaultStorageHandler>();
services.AddHandler<OpenVaultStorageHandler>();
services.AddTemplate<VaultNavigationViewModel, VaultNavigationView>();
services.AddTemplate<AllNavigationViewModel, AllNavigationView>();
services.AddTemplate<StarredNavigationViewModel, StarredNavigationView>();
@@ -83,13 +85,13 @@ public partial class App : Application
});
})!);
services.AddSingleton<IVaultHostCollection, VaultHostCollection>();
services.AddTransient<IVaultComponentFactory, VaultComponentFactory>();
services.AddHandler<CreateVaultHandler>();
services.AddSingleton<IVaultHostCollection, VaultHostCollection>();
services.AddInitializer<VaultCollectionInitializer>();
services.AddTemplate<MainViewModel, MainView>("Main");
services.AddHandler<VaultNavigationViewModelHandler>();
services.AddTransient<FooterViewModel>();