break widget related stuff into its own project as the main HB project was just becoming too bloated

This commit is contained in:
TheXamlGuy
2024-01-24 20:50:59 +00:00
parent d1b57d5d16
commit 5e26e97f6b
61 changed files with 178 additions and 95 deletions
@@ -10,6 +10,7 @@
<PackageReference Include="System.Runtime.Caching" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Hyperbar.Widget\Hyperbar.Widget.csproj" />
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
</ItemGroup>
</Project>
@@ -1,3 +1,4 @@
using Hyperbar.Widget;
using Microsoft.Extensions.DependencyInjection;
namespace Hyperbar.Windows.Primary;
@@ -1,6 +1,9 @@
namespace Hyperbar.Windows.Primary;
using Hyperbar.Widget;
public class PrimaryWidgetConfiguration : WidgetConfiguration
namespace Hyperbar.Windows.Primary;
public class PrimaryWidgetConfiguration :
WidgetConfiguration
{
public List<PrimaryCommandConfiguration> Commands { get; set; } = [];
}
@@ -1,4 +1,6 @@
namespace Hyperbar.Windows.Primary;
using Hyperbar.Widget;
namespace Hyperbar.Windows.Primary;
public class PrimaryWidgetConfigurationHandler(IMediator mediator,
PrimaryWidgetConfiguration configuration,
@@ -1,4 +1,6 @@
namespace Hyperbar.Windows.Primary;
using Hyperbar.Widget;
namespace Hyperbar.Windows.Primary;
[NotificationHandler(nameof(PrimaryWidgetViewModel))]
public class PrimaryWidgetViewModel(ITemplateFactory templateFactory,
@@ -1,4 +1,6 @@
namespace Hyperbar.Windows.Primary;
using Hyperbar.Widget;
namespace Hyperbar.Windows.Primary;
public class WidgetComponentEnumerationHandler(PrimaryWidgetConfiguration configuration,
IFactory<PrimaryCommandConfiguration, IWidgetComponentViewModel?> factory,
@@ -1,4 +1,5 @@
using CommunityToolkit.Mvvm.Input;
using Hyperbar.Widget;
namespace Hyperbar.Windows.Primary;
@@ -1,4 +1,6 @@
namespace Hyperbar.Windows.Primary;
using Hyperbar.Widget;
namespace Hyperbar.Windows.Primary;
public class WidgetComponentProvider(ICache<Guid, IWidgetComponentViewModel> cache) :
IProvider<PrimaryCommandConfiguration, IWidgetComponentViewModel?>