diff --git a/Bitvault.Avalonia/AllNavigationView.axaml b/Bitvault.Avalonia/AllNavigationView.axaml
index b534f07..022a45e 100644
--- a/Bitvault.Avalonia/AllNavigationView.axaml
+++ b/Bitvault.Avalonia/AllNavigationView.axaml
@@ -14,7 +14,7 @@
-
+
diff --git a/Bitvault.Avalonia/App.axaml.cs b/Bitvault.Avalonia/App.axaml.cs
index 6bcc0e1..598e48f 100644
--- a/Bitvault.Avalonia/App.axaml.cs
+++ b/Bitvault.Avalonia/App.axaml.cs
@@ -26,7 +26,7 @@ public partial class App : Application
public override async void OnFrameworkInitializationCompleted()
{
IHost? host = DefaultHostBuilder.Create()
- .AddConfiguration("Locker:*")
+ .AddConfiguration("Wallet:*")
.AddConfiguration("Item:*")
.AddConfiguration("Item:Bank Account", ItemConfiguration.BankAccount)
.AddConfiguration("Item:Credit Card", ItemConfiguration.CreditCard)
@@ -58,9 +58,9 @@ public partial class App : Application
services.AddTemplate("MainWindow");
}
- services.AddHandler();
+ services.AddHandler();
- services.AddTransient(provider => Component.Create(provider, args =>
+ services.AddTransient(provider => Component.Create(provider, args =>
{
args.AddServices(services =>
{
@@ -80,7 +80,7 @@ public partial class App : Application
services.AddTransient();
services.AddTransient();
- services.AddTransient();
+ services.AddTransient();
services.AddTransient(provider =>
{
@@ -92,44 +92,44 @@ public partial class App : Application
});
services.TryAddSingleton, DecoratorService>();
- services.TryAddSingleton, DecoratorService>();
+ services.TryAddSingleton, DecoratorService>();
- services.AddDbContextFactory((provider, args) =>
+ services.AddDbContextFactory((provider, args) =>
{
- if (provider.GetRequiredService>()
- is IDecoratorService connection)
+ if (provider.GetRequiredService>()
+ is IDecoratorService connection)
{
args.UseSqlite($"{connection.Service}");
}
});
- services.AddHandler();
+ services.AddHandler();
services.AddHandler();
services.AddHandler();
services.AddHandler();
services.AddHandler();
- services.AddHandler();
+ services.AddHandler();
- services.AddTemplate();
+ services.AddTemplate();
services.AddTemplate();
services.AddTemplate();
services.AddTemplate();
services.AddTemplate();
- services.AddTemplate("OpenLocker");
+ services.AddTemplate("OpenWallet");
- services.AddScoped();
+ services.AddScoped();
- services.AddTemplate("Locker");
+ services.AddTemplate("Wallet");
services.AddTemplate("ContentItemCollection");
services.AddHandler();
- services.AddTemplate("LockerHeader");
+ services.AddTemplate("WalletHeader");
services.AddTemplate();
services.AddTemplate();
- services.AddTemplate();
+ services.AddTemplate();
services.AddTemplate("ItemCategoryCollection");
services.AddTemplate();
@@ -191,11 +191,11 @@ public partial class App : Application
});
})!);
- services.AddTransient();
- services.AddHandler();
+ services.AddTransient();
+ services.AddHandler();
- services.AddSingleton();
- services.AddInitializer();
+ services.AddSingleton();
+ services.AddInitializer();
services.AddTemplate("Main");
services.AddHandler();
@@ -205,8 +205,8 @@ public partial class App : Application
services.AddTemplate();
services.AddTemplate("Manage");
- services.AddTemplate();
- services.AddTemplate("CreateLocker");
+ services.AddTemplate();
+ services.AddTemplate("CreateWallet");
})
.Build();
diff --git a/Bitvault.Avalonia/ArchiveNavigationView.axaml b/Bitvault.Avalonia/ArchiveNavigationView.axaml
index 2d922f0..9762d55 100644
--- a/Bitvault.Avalonia/ArchiveNavigationView.axaml
+++ b/Bitvault.Avalonia/ArchiveNavigationView.axaml
@@ -14,7 +14,7 @@
-
+
diff --git a/Bitvault.Avalonia/Bitvault.Avalonia.csproj b/Bitvault.Avalonia/Bitvault.Avalonia.csproj
index fe9db9d..ab84b2e 100644
--- a/Bitvault.Avalonia/Bitvault.Avalonia.csproj
+++ b/Bitvault.Avalonia/Bitvault.Avalonia.csproj
@@ -58,11 +58,11 @@
ConfirmItemActionView.axaml
-
- CreateLockerNavigationView.axaml
+
+ CreateWalletNavigationView.axaml
-
- CreateLockerView.axaml
+
+ CreateWalletView.axaml
DismissItemActionView.axaml
@@ -85,14 +85,14 @@
MaskedTextEntryView.axaml
-
- OpenLockerView.axaml
+
+ OpenWalletView.axaml
ManageNavigationView.axaml
-
- LockerHeaderView.axaml
+
+ WalletHeaderView.axaml
ItemNavigationView.axaml
@@ -100,14 +100,14 @@
ItemView.axaml
-
- LockerNavigationView.axaml
+
+ WalletNavigationView.axaml
-
- LockerView.axaml
+
+ WalletView.axaml
-
- SearchLockerActionView.axaml
+
+ SearchWalletActionView.axaml
\ No newline at end of file
diff --git a/Bitvault.Avalonia/CreateLockerNavigationView.axaml.cs b/Bitvault.Avalonia/CreateLockerNavigationView.axaml.cs
deleted file mode 100644
index f45b289..0000000
--- a/Bitvault.Avalonia/CreateLockerNavigationView.axaml.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Toolkit.UI.Controls.Avalonia;
-
-namespace Bitvault.Avalonia;
-
-public partial class CreateLockerNavigationView : SettingsExpander
-{
- public CreateLockerNavigationView() =>
- InitializeComponent();
-}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/CreateLockerNavigationView.axaml b/Bitvault.Avalonia/CreateWalletNavigationView.axaml
similarity index 80%
rename from Bitvault.Avalonia/CreateLockerNavigationView.axaml
rename to Bitvault.Avalonia/CreateWalletNavigationView.axaml
index ecfc13c..a775857 100644
--- a/Bitvault.Avalonia/CreateLockerNavigationView.axaml
+++ b/Bitvault.Avalonia/CreateWalletNavigationView.axaml
@@ -1,5 +1,5 @@
-
+
diff --git a/Bitvault.Avalonia/CreateWalletNavigationView.axaml.cs b/Bitvault.Avalonia/CreateWalletNavigationView.axaml.cs
new file mode 100644
index 0000000..05eb752
--- /dev/null
+++ b/Bitvault.Avalonia/CreateWalletNavigationView.axaml.cs
@@ -0,0 +1,9 @@
+using Toolkit.UI.Controls.Avalonia;
+
+namespace Bitvault.Avalonia;
+
+public partial class CreateWalletNavigationView : SettingsExpander
+{
+ public CreateWalletNavigationView() =>
+ InitializeComponent();
+}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/CreateLockerView.axaml b/Bitvault.Avalonia/CreateWalletView.axaml
similarity index 89%
rename from Bitvault.Avalonia/CreateLockerView.axaml
rename to Bitvault.Avalonia/CreateWalletView.axaml
index efe542f..ea78f9c 100644
--- a/Bitvault.Avalonia/CreateLockerView.axaml
+++ b/Bitvault.Avalonia/CreateWalletView.axaml
@@ -1,10 +1,10 @@
diff --git a/Bitvault.Avalonia/CreateLockerView.axaml.cs b/Bitvault.Avalonia/CreateWalletView.axaml.cs
similarity index 53%
rename from Bitvault.Avalonia/CreateLockerView.axaml.cs
rename to Bitvault.Avalonia/CreateWalletView.axaml.cs
index 2739f42..3c3c99e 100644
--- a/Bitvault.Avalonia/CreateLockerView.axaml.cs
+++ b/Bitvault.Avalonia/CreateWalletView.axaml.cs
@@ -2,8 +2,8 @@ using Toolkit.UI.Controls.Avalonia;
namespace Bitvault.Avalonia;
-public partial class CreateLockerView : ContentDialog
+public partial class CreateWalletView : ContentDialog
{
- public CreateLockerView() =>
+ public CreateWalletView() =>
InitializeComponent();
}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/MainView.axaml b/Bitvault.Avalonia/MainView.axaml
index 53194ce..d6326c9 100644
--- a/Bitvault.Avalonia/MainView.axaml
+++ b/Bitvault.Avalonia/MainView.axaml
@@ -19,7 +19,7 @@
-
+
diff --git a/Bitvault.Avalonia/ManageNavigationView.axaml b/Bitvault.Avalonia/ManageNavigationView.axaml
index 8e6c7ab..78be9bd 100644
--- a/Bitvault.Avalonia/ManageNavigationView.axaml
+++ b/Bitvault.Avalonia/ManageNavigationView.axaml
@@ -2,7 +2,7 @@
x:Class="Bitvault.Avalonia.ManageNavigationView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Content="Manage Lockers">
+ Content="Manage Wallets">
diff --git a/Bitvault.Avalonia/OpenLockerView.axaml b/Bitvault.Avalonia/OpenWalletView.axaml
similarity index 92%
rename from Bitvault.Avalonia/OpenLockerView.axaml
rename to Bitvault.Avalonia/OpenWalletView.axaml
index 38b64f5..e762152 100644
--- a/Bitvault.Avalonia/OpenLockerView.axaml
+++ b/Bitvault.Avalonia/OpenWalletView.axaml
@@ -1,9 +1,9 @@
+ x:DataType="vm:OpenWalletViewModel">
+ public OpenWalletView() =>
InitializeComponent();
}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/SearchLockerActionView.axaml.cs b/Bitvault.Avalonia/SearchLockerActionView.axaml.cs
deleted file mode 100644
index 2a18891..0000000
--- a/Bitvault.Avalonia/SearchLockerActionView.axaml.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Avalonia.Controls;
-
-namespace Bitvault.Avalonia;
-
-public partial class SearchLockerActionView : UserControl
-{
- public SearchLockerActionView() =>
- InitializeComponent();
-}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/SearchLockerActionView.axaml b/Bitvault.Avalonia/SearchWalletActionView.axaml
similarity index 94%
rename from Bitvault.Avalonia/SearchLockerActionView.axaml
rename to Bitvault.Avalonia/SearchWalletActionView.axaml
index 5aa58bb..dfdb5aa 100644
--- a/Bitvault.Avalonia/SearchLockerActionView.axaml
+++ b/Bitvault.Avalonia/SearchWalletActionView.axaml
@@ -1,9 +1,9 @@
+ x:DataType="vm:SearchWalletActionViewModel">
diff --git a/Bitvault.Avalonia/SearchWalletActionView.axaml.cs b/Bitvault.Avalonia/SearchWalletActionView.axaml.cs
new file mode 100644
index 0000000..1b1ec21
--- /dev/null
+++ b/Bitvault.Avalonia/SearchWalletActionView.axaml.cs
@@ -0,0 +1,9 @@
+using Avalonia.Controls;
+
+namespace Bitvault.Avalonia;
+
+public partial class SearchWalletActionView : UserControl
+{
+ public SearchWalletActionView() =>
+ InitializeComponent();
+}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/StarredNavigationView.axaml b/Bitvault.Avalonia/StarredNavigationView.axaml
index e4ecb63..919ee7e 100644
--- a/Bitvault.Avalonia/StarredNavigationView.axaml
+++ b/Bitvault.Avalonia/StarredNavigationView.axaml
@@ -14,7 +14,7 @@
-
+
diff --git a/Bitvault.Avalonia/LockerHeaderView.axaml b/Bitvault.Avalonia/WalletHeaderView.axaml
similarity index 87%
rename from Bitvault.Avalonia/LockerHeaderView.axaml
rename to Bitvault.Avalonia/WalletHeaderView.axaml
index 8478156..6e032f5 100644
--- a/Bitvault.Avalonia/LockerHeaderView.axaml
+++ b/Bitvault.Avalonia/WalletHeaderView.axaml
@@ -1,9 +1,9 @@
+ x:DataType="vm:WalletHeaderViewModel">
diff --git a/Bitvault.Avalonia/LockerHeaderView.axaml.cs b/Bitvault.Avalonia/WalletHeaderView.axaml.cs
similarity index 51%
rename from Bitvault.Avalonia/LockerHeaderView.axaml.cs
rename to Bitvault.Avalonia/WalletHeaderView.axaml.cs
index a46ea76..403abab 100644
--- a/Bitvault.Avalonia/LockerHeaderView.axaml.cs
+++ b/Bitvault.Avalonia/WalletHeaderView.axaml.cs
@@ -2,8 +2,8 @@ using Avalonia.Controls;
namespace Bitvault.Avalonia;
-public partial class LockerHeaderView : UserControl
+public partial class WalletHeaderView : UserControl
{
- public LockerHeaderView() =>
+ public WalletHeaderView() =>
InitializeComponent();
}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/LockerNavigationView.axaml b/Bitvault.Avalonia/WalletNavigationView.axaml
similarity index 95%
rename from Bitvault.Avalonia/LockerNavigationView.axaml
rename to Bitvault.Avalonia/WalletNavigationView.axaml
index 73cef5e..7460d9a 100644
--- a/Bitvault.Avalonia/LockerNavigationView.axaml
+++ b/Bitvault.Avalonia/WalletNavigationView.axaml
@@ -1,11 +1,11 @@
-
+
-
+
@@ -60,7 +60,7 @@
-
+
@@ -71,7 +71,7 @@
-
+
@@ -82,7 +82,7 @@
-
+
diff --git a/Bitvault.Avalonia/LockerNavigationView.axaml.cs b/Bitvault.Avalonia/WalletNavigationView.axaml.cs
similarity index 50%
rename from Bitvault.Avalonia/LockerNavigationView.axaml.cs
rename to Bitvault.Avalonia/WalletNavigationView.axaml.cs
index f2b828c..104e80d 100644
--- a/Bitvault.Avalonia/LockerNavigationView.axaml.cs
+++ b/Bitvault.Avalonia/WalletNavigationView.axaml.cs
@@ -2,8 +2,8 @@ using Toolkit.UI.Controls.Avalonia;
namespace Bitvault.Avalonia;
-public partial class LockerNavigationView : NavigationViewItem
+public partial class WalletNavigationView : NavigationViewItem
{
- public LockerNavigationView() =>
+ public WalletNavigationView() =>
InitializeComponent();
}
\ No newline at end of file
diff --git a/Bitvault.Avalonia/LockerView.axaml b/Bitvault.Avalonia/WalletView.axaml
similarity index 96%
rename from Bitvault.Avalonia/LockerView.axaml
rename to Bitvault.Avalonia/WalletView.axaml
index e62c6c6..cf979db 100644
--- a/Bitvault.Avalonia/LockerView.axaml
+++ b/Bitvault.Avalonia/WalletView.axaml
@@ -1,9 +1,9 @@
+ x:DataType="vm:WalletViewModel">
-
+
diff --git a/Bitvault.Avalonia/LockerView.axaml.cs b/Bitvault.Avalonia/WalletView.axaml.cs
similarity index 81%
rename from Bitvault.Avalonia/LockerView.axaml.cs
rename to Bitvault.Avalonia/WalletView.axaml.cs
index 22cfaca..96112ec 100644
--- a/Bitvault.Avalonia/LockerView.axaml.cs
+++ b/Bitvault.Avalonia/WalletView.axaml.cs
@@ -4,9 +4,9 @@ using FluentAvalonia.UI.Windowing;
namespace Bitvault.Avalonia;
-public partial class LockerView : UserControl
+public partial class WalletView : UserControl
{
- public LockerView() => InitializeComponent();
+ public WalletView() => InitializeComponent();
protected override void OnLoaded(RoutedEventArgs args)
{
diff --git a/Bitvault.Data/LockerContext.cs b/Bitvault.Data/LockerContext.cs
index 196f691..5196a37 100644
--- a/Bitvault.Data/LockerContext.cs
+++ b/Bitvault.Data/LockerContext.cs
@@ -2,7 +2,7 @@
namespace Bitvault.Data;
-public class LockerContext(DbContextOptions options) :
+public class WalletContext(DbContextOptions options) :
DbContext(options)
{
public DbSet Blobs { get; set; }
diff --git a/Bitvault/AllNavigationViewModel.cs b/Bitvault/AllNavigationViewModel.cs
index 4a6f308..85b4db7 100644
--- a/Bitvault/AllNavigationViewModel.cs
+++ b/Bitvault/AllNavigationViewModel.cs
@@ -8,4 +8,4 @@ public partial class AllNavigationViewModel(IServiceProvider provider,
IPublisher publisher,
ISubscription subscriber,
IDisposer disposer,
- string filter) : FilterLockerNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, filter);
\ No newline at end of file
+ string filter) : FilterWalletNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, filter);
\ No newline at end of file
diff --git a/Bitvault/ArchiveNavigationViewModel.cs b/Bitvault/ArchiveNavigationViewModel.cs
index 941af96..c2fa98c 100644
--- a/Bitvault/ArchiveNavigationViewModel.cs
+++ b/Bitvault/ArchiveNavigationViewModel.cs
@@ -8,4 +8,4 @@ public partial class ArchiveNavigationViewModel(IServiceProvider provider,
IPublisher publisher,
ISubscription subscriber,
IDisposer disposer,
- string name) : FilterLockerNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, name);
\ No newline at end of file
+ string name) : FilterWalletNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, name);
\ No newline at end of file
diff --git a/Bitvault/CategoriesNavigationViewModel.cs b/Bitvault/CategoriesNavigationViewModel.cs
index 2bfbe14..c720169 100644
--- a/Bitvault/CategoriesNavigationViewModel.cs
+++ b/Bitvault/CategoriesNavigationViewModel.cs
@@ -8,4 +8,4 @@ public partial class CategoriesNavigationViewModel(IServiceProvider provider,
IPublisher publisher,
ISubscription subscriber,
IDisposer disposer,
- string name) : FilterLockerNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, name);
\ No newline at end of file
+ string name) : FilterWalletNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, name);
\ No newline at end of file
diff --git a/Bitvault/CreateItemHandler.cs b/Bitvault/CreateItemHandler.cs
index afe89f6..0df110d 100644
--- a/Bitvault/CreateItemHandler.cs
+++ b/Bitvault/CreateItemHandler.cs
@@ -7,7 +7,7 @@ using Toolkit.Foundation;
namespace Bitvault;
-public class CreateItemHandler(IDbContextFactory dbContextFactory) :
+public class CreateItemHandler(IDbContextFactory dbContextFactory) :
IHandler, bool>
{
public async Task Handle(CreateEventArgs<(Guid, string, string, ItemConfiguration)> args,
@@ -32,7 +32,7 @@ public class CreateItemHandler(IDbContextFactory dbContextFactory
Type = 0,
});
- using LockerContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
+ using WalletContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
EntityEntry? result = await context.AddAsync(itemEntry, cancellationToken);
await context.SaveChangesAsync(cancellationToken);
diff --git a/Bitvault/CreateLockerHandler.cs b/Bitvault/CreateWalletHandler.cs
similarity index 70%
rename from Bitvault/CreateLockerHandler.cs
rename to Bitvault/CreateWalletHandler.cs
index 6dd0672..d97cfc4 100644
--- a/Bitvault/CreateLockerHandler.cs
+++ b/Bitvault/CreateWalletHandler.cs
@@ -5,16 +5,16 @@ using Toolkit.Foundation;
namespace Bitvault;
-public class CreateLockerHandler(ILockerFactory componentFactory,
+public class CreateWalletHandler(IWalletFactory componentFactory,
IPublisher publisher) :
- IHandler>, bool>
+ IHandler>, bool>
{
- public async Task Handle(CreateEventArgs> args,
+ public async Task Handle(CreateEventArgs> args,
CancellationToken cancellationToken)
{
- if (args.Value is Locker <(string, string)> locker)
+ if (args.Value is Wallet <(string, string)> Wallet)
{
- if (locker.Value is (string name, string password) &&
+ if (Wallet.Value is (string name, string password) &&
name is { Length: > 0 } &&
password is { Length: > 0 })
{
@@ -22,16 +22,16 @@ public class CreateLockerHandler(ILockerFactory componentFactory,
{
ISecurityKeyFactory keyVaultFactory = host.Services.GetRequiredService();
IDecoratorService secureKeyStore = host.Services.GetRequiredService>();
- ILockerStorageFactory lockerStorageFactory = host.Services.GetRequiredService();
+ IWalletStorageFactory WalletStorageFactory = host.Services.GetRequiredService();
if (keyVaultFactory.Create(Encoding.UTF8.GetBytes(password)) is SecurityKey key)
{
secureKeyStore.Set(key);
- if (await lockerStorageFactory.Create(name, key))
+ if (await WalletStorageFactory.Create(name, key))
{
- IWritableConfiguration configuration =
- host.Services.GetRequiredService>();
+ IWritableConfiguration configuration =
+ host.Services.GetRequiredService>();
configuration.Write(args => args.Key = $"{Convert.ToBase64String(key.Salt)}:{Convert.ToBase64String(key.EncryptedKey)}:{Convert.ToBase64String(key.DecryptedKey)}");
host.Start();
diff --git a/Bitvault/CreateLockerNavigationViewModel.cs b/Bitvault/CreateWalletNavigationViewModel.cs
similarity index 82%
rename from Bitvault/CreateLockerNavigationViewModel.cs
rename to Bitvault/CreateWalletNavigationViewModel.cs
index 26c7237..685de9b 100644
--- a/Bitvault/CreateLockerNavigationViewModel.cs
+++ b/Bitvault/CreateWalletNavigationViewModel.cs
@@ -2,7 +2,7 @@
namespace Bitvault;
-public partial class CreateLockerNavigationViewModel(IServiceProvider provider,
+public partial class CreateWalletNavigationViewModel(IServiceProvider provider,
IServiceFactory factory,
IMediator mediator,
IPublisher publisher,
diff --git a/Bitvault/CreateLockerViewModel.cs b/Bitvault/CreateWalletViewModel.cs
similarity index 74%
rename from Bitvault/CreateLockerViewModel.cs
rename to Bitvault/CreateWalletViewModel.cs
index 8de7472..5c660b3 100644
--- a/Bitvault/CreateLockerViewModel.cs
+++ b/Bitvault/CreateWalletViewModel.cs
@@ -4,7 +4,7 @@ using Toolkit.Foundation;
namespace Bitvault;
-public partial class CreateLockerViewModel(IServiceProvider provider,
+public partial class CreateWalletViewModel(IServiceProvider provider,
IServiceFactory factory,
IPublisher publisher,
IMediator mediator,
@@ -22,5 +22,5 @@ public partial class CreateLockerViewModel(IServiceProvider provider,
private string password;
public async Task Confirm() =>
- await Mediator.Handle>, bool>(Create.As(new Locker<(string, string)>((Name, Password))));
+ await Mediator.Handle>, bool>(Create.As(new Wallet<(string, string)>((Name, Password))));
}
\ No newline at end of file
diff --git a/Bitvault/FilterLockerNavigationViewModel.cs b/Bitvault/FilterWalletNavigationViewModel.cs
similarity index 67%
rename from Bitvault/FilterLockerNavigationViewModel.cs
rename to Bitvault/FilterWalletNavigationViewModel.cs
index a77c5db..022745c 100644
--- a/Bitvault/FilterLockerNavigationViewModel.cs
+++ b/Bitvault/FilterWalletNavigationViewModel.cs
@@ -4,10 +4,10 @@ using Toolkit.Foundation;
namespace Bitvault;
-public partial class FilterLockerNavigationViewModel : Observable,
- ILockerNavigationViewModel,
- INotificationHandler>,
- INotificationHandler>
+public partial class FilterWalletNavigationViewModel : Observable,
+ IWalletNavigationViewModel,
+ INotificationHandler>,
+ INotificationHandler>
{
[ObservableProperty]
private bool activated;
@@ -18,7 +18,7 @@ public partial class FilterLockerNavigationViewModel : Observable,
[ObservableProperty]
private bool selected;
- public FilterLockerNavigationViewModel(IServiceProvider provider,
+ public FilterWalletNavigationViewModel(IServiceProvider provider,
IServiceFactory factory,
IMediator mediator,
IPublisher publisher,
@@ -29,10 +29,10 @@ public partial class FilterLockerNavigationViewModel : Observable,
Filter = filter;
}
- public Task Handle(DeactivatedEventArgs args) =>
+ public Task Handle(DeactivatedEventArgs args) =>
Task.FromResult(Activated = false);
- public Task Handle(ActivatedEventArgs args) =>
+ public Task Handle(ActivatedEventArgs args) =>
Task.FromResult(Activated = true);
[RelayCommand]
diff --git a/Bitvault/ILockerComponent.cs b/Bitvault/IWalletComponent.cs
similarity index 52%
rename from Bitvault/ILockerComponent.cs
rename to Bitvault/IWalletComponent.cs
index f17734c..1823893 100644
--- a/Bitvault/ILockerComponent.cs
+++ b/Bitvault/IWalletComponent.cs
@@ -2,4 +2,4 @@
namespace Bitvault;
-public interface ILockerComponent : IComponent;
\ No newline at end of file
+public interface IWalletComponent : IComponent;
\ No newline at end of file
diff --git a/Bitvault/ILockerFactory.cs b/Bitvault/IWalletFactory.cs
similarity index 75%
rename from Bitvault/ILockerFactory.cs
rename to Bitvault/IWalletFactory.cs
index 9aac52d..52d0096 100644
--- a/Bitvault/ILockerFactory.cs
+++ b/Bitvault/IWalletFactory.cs
@@ -2,7 +2,7 @@
namespace Bitvault
{
- public interface ILockerFactory
+ public interface IWalletFactory
{
IComponentHost? Create(string name);
}
diff --git a/Bitvault/ILockerHost.cs b/Bitvault/IWalletHost.cs
similarity index 52%
rename from Bitvault/ILockerHost.cs
rename to Bitvault/IWalletHost.cs
index d7114e9..06d8722 100644
--- a/Bitvault/ILockerHost.cs
+++ b/Bitvault/IWalletHost.cs
@@ -2,4 +2,4 @@
namespace Bitvault;
-public interface ILockerHost : IComponentHost;
\ No newline at end of file
+public interface IWalletHost : IComponentHost;
\ No newline at end of file
diff --git a/Bitvault/ILockerHostCollection.cs b/Bitvault/IWalletHostCollection.cs
similarity index 74%
rename from Bitvault/ILockerHostCollection.cs
rename to Bitvault/IWalletHostCollection.cs
index e248d8a..33bf568 100644
--- a/Bitvault/ILockerHostCollection.cs
+++ b/Bitvault/IWalletHostCollection.cs
@@ -2,7 +2,7 @@
namespace Bitvault;
-public interface ILockerHostCollection :
+public interface IWalletHostCollection :
IEnumerable
{
void Add(IComponentHost host);
diff --git a/Bitvault/ILockerNavigationViewModel.cs b/Bitvault/IWalletNavigationViewModel.cs
similarity index 64%
rename from Bitvault/ILockerNavigationViewModel.cs
rename to Bitvault/IWalletNavigationViewModel.cs
index 524944c..5a9cfaa 100644
--- a/Bitvault/ILockerNavigationViewModel.cs
+++ b/Bitvault/IWalletNavigationViewModel.cs
@@ -2,6 +2,6 @@
namespace Bitvault;
-public interface ILockerNavigationViewModel :
+public interface IWalletNavigationViewModel :
ISelectable,
IDisposable;
\ No newline at end of file
diff --git a/Bitvault/ILockerStorageFactory.cs b/Bitvault/IWalletStorageFactory.cs
similarity index 67%
rename from Bitvault/ILockerStorageFactory.cs
rename to Bitvault/IWalletStorageFactory.cs
index b209314..e2fed8e 100644
--- a/Bitvault/ILockerStorageFactory.cs
+++ b/Bitvault/IWalletStorageFactory.cs
@@ -1,6 +1,6 @@
namespace Bitvault;
-public interface ILockerStorageFactory
+public interface IWalletStorageFactory
{
Task Create(string name, SecurityKey key);
}
\ No newline at end of file
diff --git a/Bitvault/ItemCategoryCollectionViewModel.cs b/Bitvault/ItemCategoryCollectionViewModel.cs
index e6b975c..91ca836 100644
--- a/Bitvault/ItemCategoryCollectionViewModel.cs
+++ b/Bitvault/ItemCategoryCollectionViewModel.cs
@@ -18,7 +18,7 @@ public partial class ItemCategoryCollectionViewModel(IServiceProvider provider,
public override Task OnActivated()
{
- Publisher.Publish(Notify.As(Factory.Create(new List
+ Publisher.Publish(Notify.As(Factory.Create(new List
{
Factory.Create(),
})));
diff --git a/Bitvault/ItemCollectionViewModel.cs b/Bitvault/ItemCollectionViewModel.cs
index 1d7c5a8..72ec314 100644
--- a/Bitvault/ItemCollectionViewModel.cs
+++ b/Bitvault/ItemCollectionViewModel.cs
@@ -16,7 +16,7 @@ public partial class ItemCollectionViewModel :
[ObservableProperty]
public string? named;
- private LockerViewModelConfiguration configuration;
+ private WalletViewModelConfiguration configuration;
public ItemCollectionViewModel(IServiceProvider provider,
IServiceFactory factory,
@@ -26,7 +26,7 @@ public partial class ItemCollectionViewModel :
IDisposer disposer,
IContentTemplate template,
NamedComponent named,
- LockerViewModelConfiguration configuration,
+ WalletViewModelConfiguration configuration,
string? filter = null) : base(provider, factory, mediator, publisher, subscriber, disposer)
{
Template = template;
@@ -61,15 +61,15 @@ public partial class ItemCollectionViewModel :
public override Task OnActivated()
{
- Publisher.Publish(Notify.As(Factory.Create(new List
+ Publisher.Publish(Notify.As(Factory.Create(new List
{
Factory.Create(),
- Factory.Create(),
+ Factory.Create(),
})));
return base.OnActivated();
}
protected override SynchronizeExpression BuildAggregateExpression() =>
- new(Synchronize.As(configuration));
+ new(Synchronize.As(configuration));
}
diff --git a/Bitvault/Locker.cs b/Bitvault/Locker.cs
deleted file mode 100644
index a8590c2..0000000
--- a/Bitvault/Locker.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace Bitvault;
-
-public record Locker(TValue Value);
-
-public record Locker;
\ No newline at end of file
diff --git a/Bitvault/LockerActivatedHandler.cs b/Bitvault/LockerActivatedHandler.cs
deleted file mode 100644
index b3cab94..0000000
--- a/Bitvault/LockerActivatedHandler.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using Microsoft.Extensions.DependencyInjection;
-using Toolkit.Foundation;
-
-namespace Bitvault;
-
-public class LockerActivatedHandler(ILockerHostCollection lockers,
- IPublisher publisher) :
- INotificationHandler>
-{
- public Task Handle(ActivatedEventArgs args)
- {
- if (args.Value is IComponentHost locker)
- {
- List sortedLockers = [.. lockers, locker];
- sortedLockers = [.. sortedLockers.OrderBy(x => x.Services.GetRequiredService>() is
- IConfigurationDescriptor descriptor ? descriptor.Name : null)];
-
- int index = sortedLockers.IndexOf(locker);
-
- if (locker.Services.GetRequiredService>() is ConfigurationDescriptor descriptor)
- {
- if (locker.Services.GetRequiredService() is IServiceFactory serviceFactory)
- {
- if (serviceFactory.Create(descriptor.Name) is LockerNavigationViewModel viewModel)
- {
- publisher.Publish(new InsertEventArgs(index, viewModel),
- nameof(MainViewModel));
- }
- }
- }
- }
-
- return Task.CompletedTask;
- }
-}
\ No newline at end of file
diff --git a/Bitvault/LockerComponent.cs b/Bitvault/LockerComponent.cs
deleted file mode 100644
index 071520b..0000000
--- a/Bitvault/LockerComponent.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-using Toolkit.Foundation;
-
-namespace Bitvault;
-
-public class LockerComponent(IComponentBuilder builder) : Component(builder),
- ILockerComponent;
\ No newline at end of file
diff --git a/Bitvault/LockerFactory.cs b/Bitvault/LockerFactory.cs
deleted file mode 100644
index 4cdd1e1..0000000
--- a/Bitvault/LockerFactory.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Toolkit.Foundation;
-
-namespace Bitvault;
-
-public class LockerFactory(IComponentFactory componentFactory) :
- ILockerFactory
-{
- public IComponentHost? Create(string name)
- {
- if (componentFactory.Create($"Locker:{name}", new LockerConfiguration()) is IComponentHost host)
- {
- return host;
- }
-
- return default;
- }
-}
\ No newline at end of file
diff --git a/Bitvault/LockerInitializer.cs b/Bitvault/LockerInitializer.cs
deleted file mode 100644
index 51178b0..0000000
--- a/Bitvault/LockerInitializer.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using Toolkit.Foundation;
-
-namespace Bitvault;
-
-public class LockerInitializer(IEnumerable> configurations,
- IComponentFactory componentFactory,
- ILockerHostCollection lockers) : IInitializer
-{
- public async Task Initialize()
- {
- foreach (IConfigurationDescriptor configuration in configurations)
- {
- if (componentFactory.Create(configuration.Section, configuration.Value)
- is IComponentHost host)
- {
- lockers.Add(host);
- await host.StartAsync();
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Bitvault/ManageViewModel.cs b/Bitvault/ManageViewModel.cs
index 3559420..183541e 100644
--- a/Bitvault/ManageViewModel.cs
+++ b/Bitvault/ManageViewModel.cs
@@ -16,7 +16,7 @@ public partial class ManageViewModel :
{
Template = template;
- Add();
+ Add();
}
public IContentTemplate Template { get; set; }
diff --git a/Bitvault/OpenLockerHandler.cs b/Bitvault/OpenWalletHandler.cs
similarity index 63%
rename from Bitvault/OpenLockerHandler.cs
rename to Bitvault/OpenWalletHandler.cs
index 01b2b0f..53c5fc7 100644
--- a/Bitvault/OpenLockerHandler.cs
+++ b/Bitvault/OpenWalletHandler.cs
@@ -3,19 +3,19 @@ using Toolkit.Foundation;
namespace Bitvault;
-public class OpenLockerHandler(IConfigurationDescriptor descriptor,
+public class OpenWalletHandler(IConfigurationDescriptor descriptor,
ISecurityKeyFactory securityKeyFactory,
- ILockerStorageFactory lockerStorageFactory) :
- IHandler>, bool>
+ IWalletStorageFactory WalletStorageFactory) :
+ IHandler>, bool>
{
- public async Task Handle(ActivateEventArgs> args,
+ public async Task Handle(ActivateEventArgs> args,
CancellationToken cancellationToken)
{
- if (args.Value is Locker locker &&
+ if (args.Value is Wallet Wallet &&
descriptor.Name is { Length: > 0 } name &&
- locker.Value is { Length: > 0 } password)
+ Wallet.Value is { Length: > 0 } password)
{
- LockerConfiguration configuration = descriptor.Value;
+ WalletConfiguration configuration = descriptor.Value;
if (configuration.Key?.Split(':') is { Length: >= 2 } keyPart)
{
byte[]? salt = Convert.FromBase64String(keyPart[0]);
@@ -23,7 +23,7 @@ public class OpenLockerHandler(IConfigurationDescriptor des
if (securityKeyFactory.Create(Encoding.UTF8.GetBytes(password), encryptedKey, salt) is SecurityKey key)
{
- if (await lockerStorageFactory.Create(name, key))
+ if (await WalletStorageFactory.Create(name, key))
{
return true;
}
diff --git a/Bitvault/OpenLockerViewModel.cs b/Bitvault/OpenWalletViewModel.cs
similarity index 72%
rename from Bitvault/OpenLockerViewModel.cs
rename to Bitvault/OpenWalletViewModel.cs
index 1d38afa..3833778 100644
--- a/Bitvault/OpenLockerViewModel.cs
+++ b/Bitvault/OpenWalletViewModel.cs
@@ -4,7 +4,7 @@ using Toolkit.Foundation;
namespace Bitvault;
-public partial class OpenLockerViewModel(IServiceProvider provider,
+public partial class OpenWalletViewModel(IServiceProvider provider,
IServiceFactory factory,
IMediator mediator,
IPublisher publisher,
@@ -24,9 +24,9 @@ public partial class OpenLockerViewModel(IServiceProvider provider,
{
if (Password is { Length: > 0 })
{
- if (await Mediator.Handle>, bool>(Activate.As(new Locker(Password))))
+ if (await Mediator.Handle>, bool>(Activate.As(new Wallet(Password))))
{
- Publisher.Publish(Opened.As());
+ Publisher.Publish(Opened.As());
}
}
}
diff --git a/Bitvault/QueryLockerHandler.cs b/Bitvault/QueryWalletHandler.cs
similarity index 83%
rename from Bitvault/QueryLockerHandler.cs
rename to Bitvault/QueryWalletHandler.cs
index 736c669..1c2896e 100644
--- a/Bitvault/QueryLockerHandler.cs
+++ b/Bitvault/QueryWalletHandler.cs
@@ -5,16 +5,16 @@ using Toolkit.Foundation;
namespace Bitvault;
-public class QueryLockerHandler(IDbContextFactory dbContextFactory) :
- IHandler>, IReadOnlyCollection<(Guid Id, string? Name, string Category, bool Favourite, bool Archived)>>
+public class QueryWalletHandler(IDbContextFactory dbContextFactory) :
+ IHandler>, IReadOnlyCollection<(Guid Id, string? Name, string Category, bool Favourite, bool Archived)>>
{
public async Task>
- Handle(QueryEventArgs> args,CancellationToken cancellationToken)
+ Handle(QueryEventArgs> args,CancellationToken cancellationToken)
{
List<(Guid Id, string? Name, string Category, bool Favourite, bool Archived)> items = [];
- if (args.Value is Locker<(string, string)> locker)
+ if (args.Value is Wallet<(string, string)> Wallet)
{
- (string filter, string text) = locker.Value;
+ (string filter, string text) = Wallet.Value;
ExpressionStarter predicate =
PredicateBuilder.New(true);
@@ -39,7 +39,7 @@ public class QueryLockerHandler(IDbContextFactory dbContextFactor
predicate = predicate.And(x => EF.Functions.Like(x.Name, $"%{text}%"));
}
- using LockerContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
+ using WalletContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
var results = await context.Set()
.Where(predicate)
.Select(x => new
diff --git a/Bitvault/RequestItemHandler.cs b/Bitvault/RequestItemHandler.cs
index c41fec2..8d139ce 100644
--- a/Bitvault/RequestItemHandler.cs
+++ b/Bitvault/RequestItemHandler.cs
@@ -5,7 +5,7 @@ using Toolkit.Foundation;
namespace Bitvault;
-public class RequestItemHandler(IDbContextFactory dbContextFactory) :
+public class RequestItemHandler(IDbContextFactory dbContextFactory) :
IHandler>, (Guid, string, string?, string, ItemConfiguration?)>
{
public async Task<(Guid, string, string?, string, ItemConfiguration?)> Handle(RequestEventArgs- > args,
@@ -15,7 +15,7 @@ public class RequestItemHandler(IDbContextFactory dbContextFactor
{
Guid id = item.Value;
- using LockerContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
+ using WalletContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
var result = await context.Set()
.Where(x => x.Id == id)
.Select(x => new
diff --git a/Bitvault/SearchLockerActionViewModel.cs b/Bitvault/SearchWalletActionViewModel.cs
similarity index 89%
rename from Bitvault/SearchLockerActionViewModel.cs
rename to Bitvault/SearchWalletActionViewModel.cs
index 093ac5e..149829e 100644
--- a/Bitvault/SearchLockerActionViewModel.cs
+++ b/Bitvault/SearchWalletActionViewModel.cs
@@ -4,7 +4,7 @@ using Toolkit.Foundation;
namespace Bitvault;
-public partial class SearchLockerActionViewModel(IServiceProvider provider,
+public partial class SearchWalletActionViewModel(IServiceProvider provider,
IServiceFactory factory,
IMediator mediator,
IPublisher publisher,
diff --git a/Bitvault/StarredNavigationViewModel.cs b/Bitvault/StarredNavigationViewModel.cs
index a5120d6..b0dd18a 100644
--- a/Bitvault/StarredNavigationViewModel.cs
+++ b/Bitvault/StarredNavigationViewModel.cs
@@ -8,4 +8,4 @@ public partial class StarredNavigationViewModel(IServiceProvider provider,
IPublisher publisher,
ISubscription subscriber,
IDisposer disposer,
- string name) : FilterLockerNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, name);
\ No newline at end of file
+ string name) : FilterWalletNavigationViewModel(provider, factory, mediator, publisher, subscriber, disposer, name);
\ No newline at end of file
diff --git a/Bitvault/SynchronizeItemViewModelHandler.cs b/Bitvault/SynchronizeItemViewModelHandler.cs
index 13e987c..585f7a6 100644
--- a/Bitvault/SynchronizeItemViewModelHandler.cs
+++ b/Bitvault/SynchronizeItemViewModelHandler.cs
@@ -7,19 +7,19 @@ public class SynchronizeItemViewModelHandler(IMediator mediator,
IServiceProvider serviceProvider,
ICache
- > cache,
IPublisher publisher) :
- INotificationHandler>
+ INotificationHandler>
{
public async Task Handle(SynchronizeEventArgs args)
+ WalletViewModelConfiguration> args)
{
- if (args.Value is LockerViewModelConfiguration configuration)
+ if (args.Value is WalletViewModelConfiguration configuration)
{
cache.Clear();
bool selected = true;
IReadOnlyCollection<(Guid Id, string Name, string Category, bool Favourite, bool Archived)>? results =
- await mediator.Handle>,
- IReadOnlyCollection<(Guid Id, string Name, string Category, bool Favourite, bool Archived)>>(Query.As(new Locker<(string?, string?)>((configuration.Filter, configuration.Query))));
+ await mediator.Handle>,
+ IReadOnlyCollection<(Guid Id, string Name, string Category, bool Favourite, bool Archived)>>(Query.As(new Wallet<(string?, string?)>((configuration.Filter, configuration.Query))));
if (results is not null)
{
diff --git a/Bitvault/SynchronizeMainViewModelHandler.cs b/Bitvault/SynchronizeMainViewModelHandler.cs
index 37ca7ff..f638559 100644
--- a/Bitvault/SynchronizeMainViewModelHandler.cs
+++ b/Bitvault/SynchronizeMainViewModelHandler.cs
@@ -4,22 +4,22 @@ using Toolkit.Foundation;
namespace Bitvault;
public class SynchronizeMainViewModelHandler(IPublisher publisher,
- ILockerHostCollection lockers) :
+ IWalletHostCollection Wallets) :
INotificationHandler>
{
public Task Handle(SynchronizeEventArgs args)
{
bool selected = true;
- foreach (IComponentHost locker in lockers.OrderBy(x => x.Services.GetRequiredService>()
- is IConfigurationDescriptor descriptor ? descriptor.Name : null))
+ foreach (IComponentHost Wallet in Wallets.OrderBy(x => x.Services.GetRequiredService>()
+ is IConfigurationDescriptor descriptor ? descriptor.Name : null))
{
- if (locker.Services.GetRequiredService>()
- is IConfigurationDescriptor descriptor)
+ if (Wallet.Services.GetRequiredService>()
+ is IConfigurationDescriptor descriptor)
{
- if (locker.Services.GetRequiredService() is IServiceFactory factory)
+ if (Wallet.Services.GetRequiredService() is IServiceFactory factory)
{
- if (factory.Create(descriptor.Name, selected)
- is LockerNavigationViewModel viewModel)
+ if (factory.Create(descriptor.Name, selected)
+ is WalletNavigationViewModel viewModel)
{
publisher.Publish(Create.As(viewModel),
nameof(MainViewModel));
diff --git a/Bitvault/UnarchiveItemHandler.cs b/Bitvault/UnarchiveItemHandler.cs
index 8a2236c..128b126 100644
--- a/Bitvault/UnarchiveItemHandler.cs
+++ b/Bitvault/UnarchiveItemHandler.cs
@@ -6,7 +6,7 @@ using Toolkit.Foundation;
namespace Bitvault;
public class UnarchiveItemHandler(IDecoratorService
- > decoratorService,
- IDbContextFactory dbContextFactory) :
+ IDbContextFactory dbContextFactory) :
INotificationHandler>
{
public async Task Handle(UnarchiveEventArgs
- args)
@@ -17,7 +17,7 @@ public class UnarchiveItemHandler(IDecoratorService
- > decora
{
(Guid id, string name) = item.Value;
- using LockerContext context = await dbContextFactory.CreateDbContextAsync();
+ using WalletContext context = await dbContextFactory.CreateDbContextAsync();
if (await context.FindAsync(id) is ItemEntry result)
{
result.State = 0;
diff --git a/Bitvault/UpdateItemHander.cs b/Bitvault/UpdateItemHander.cs
index dbb9048..ffaa522 100644
--- a/Bitvault/UpdateItemHander.cs
+++ b/Bitvault/UpdateItemHander.cs
@@ -6,7 +6,7 @@ using Toolkit.Foundation;
namespace Bitvault;
-public class UpdateItemHander(IDbContextFactory dbContextFactory) :
+public class UpdateItemHander(IDbContextFactory dbContextFactory) :
IHandler>, bool>
{
public async Task Handle(UpdateEventArgs
- > args,
@@ -18,7 +18,7 @@ public class UpdateItemHander(IDbContextFactory dbContextFactory)
try
{
- using LockerContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
+ using WalletContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
ItemEntry? result = result = await context.Set().FindAsync([id], cancellationToken);
if (result is not null)
diff --git a/Bitvault/UpdateItemStateHandler.cs b/Bitvault/UpdateItemStateHandler.cs
index 612f965..3d5fec3 100644
--- a/Bitvault/UpdateItemStateHandler.cs
+++ b/Bitvault/UpdateItemStateHandler.cs
@@ -4,7 +4,7 @@ using Toolkit.Foundation;
namespace Bitvault;
-public class UpdateItemStateHandler(IDbContextFactory dbContextFactory) :
+public class UpdateItemStateHandler(IDbContextFactory dbContextFactory) :
IHandler, bool>
{
public async Task Handle(UpdateEventArgs<(Guid, int)> args,
@@ -14,7 +14,7 @@ public class UpdateItemStateHandler(IDbContextFactory dbContextFa
{
await Task.Run(async () =>
{
- using LockerContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
+ using WalletContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
if (await context.FindAsync(id) is ItemEntry result)
{
result.State = state;
diff --git a/Bitvault/Wallet.cs b/Bitvault/Wallet.cs
new file mode 100644
index 0000000..9af5d67
--- /dev/null
+++ b/Bitvault/Wallet.cs
@@ -0,0 +1,5 @@
+namespace Bitvault;
+
+public record Wallet(TValue Value);
+
+public record Wallet;
\ No newline at end of file
diff --git a/Bitvault/WalletActivatedHandler.cs b/Bitvault/WalletActivatedHandler.cs
new file mode 100644
index 0000000..40fc3d0
--- /dev/null
+++ b/Bitvault/WalletActivatedHandler.cs
@@ -0,0 +1,35 @@
+using Microsoft.Extensions.DependencyInjection;
+using Toolkit.Foundation;
+
+namespace Bitvault;
+
+public class WalletActivatedHandler(IWalletHostCollection Wallets,
+ IPublisher publisher) :
+ INotificationHandler>
+{
+ public Task Handle(ActivatedEventArgs args)
+ {
+ if (args.Value is IComponentHost Wallet)
+ {
+ List sortedWallets = [.. Wallets, Wallet];
+ sortedWallets = [.. sortedWallets.OrderBy(x => x.Services.GetRequiredService>() is
+ IConfigurationDescriptor descriptor ? descriptor.Name : null)];
+
+ int index = sortedWallets.IndexOf(Wallet);
+
+ if (Wallet.Services.GetRequiredService