Files
Walleby/Bitvault/LockerHeaderViewModel.cs
T
TheXamlGuy 8995982607 WIP
2024-06-05 19:18:17 +01:00

31 lines
873 B
C#

using Toolkit.Foundation;
namespace Bitvault;
public partial class LockerHeaderViewModel(IServiceProvider provider,
IServiceFactory factory,
IMediator mediator,
IPublisher publisher,
ISubscription subscriber,
IDisposer disposer,
IContentTemplate template) :
ObservableCollection(provider, factory, mediator, publisher, subscriber, disposer),
INotificationHandler<NotifyEventArgs<LockerCommandHeaderCollection>>
{
public IContentTemplate Template { get; set; } = template;
public Task Handle(NotifyEventArgs<LockerCommandHeaderCollection> args)
{
Clear();
if (args.Value is LockerCommandHeaderCollection commandCollection)
{
foreach (IDisposable command in commandCollection)
{
Add(command);
}
}
return Task.CompletedTask;
}
}