more refoctoring work

This commit is contained in:
TheXamlGuy
2024-01-20 21:58:57 +00:00
parent 3a268db79d
commit 45070dc560
42 changed files with 477 additions and 361 deletions
@@ -0,0 +1,15 @@
namespace Hyperbar.Windows.Primary;
public class WidgetComponentProvider(ICache<Guid, IWidgetComponentViewModel> cache) :
IProvider<PrimaryCommandConfiguration, IWidgetComponentViewModel?>
{
public IWidgetComponentViewModel? Get(PrimaryCommandConfiguration value)
{
if (cache.TryGetValue(value.Id, out IWidgetComponentViewModel? viewModel))
{
return viewModel;
}
return default;
}
}