Damn garbage collector

This commit is contained in:
TheXamlGuy
2024-01-15 22:02:30 +00:00
parent 2a494e1b94
commit f0ef3d1604
47 changed files with 452 additions and 257 deletions
@@ -0,0 +1,20 @@
using CommunityToolkit.Mvvm.Input;
using System.Windows.Input;
namespace Hyperbar.Windows.MediaController;
public class MediaButtonViewModel(IServiceFactory serviceFactory,
IMediator mediator,
IDisposer disposer,
ITemplateFactory templateFactory,
Guid guid = default,
string? text = null,
string? icon = null,
RelayCommand? command = null) :
WidgetButtonViewModel(serviceFactory, mediator, disposer, templateFactory, guid, text, icon, command),
IViewModelInitialization
{
public ICommand Initialize => new AsyncRelayCommand(InitializeAsync);
public async Task InitializeAsync() => await Mediator.PublishAsync<Request<Playback>>();
}