restructure project for part 2

This commit is contained in:
TheXamlGuy
2024-01-27 10:55:53 +00:00
parent a322893166
commit 48925b89ff
96 changed files with 383 additions and 351 deletions
@@ -0,0 +1,15 @@
namespace Hyperbar.Widget.Contextual.Windows;
public class ContextualWidget :
IWidget
{
public IWidgetBuilder Create() =>
WidgetBuilder<ContextualWidgetConfiguration>.Configure(args =>
{
args.Name = "Contextual commands";
}).ConfigureServices(args =>
{
args.AddWidgetTemplate<ContextualWidgetViewModel>();
});
}
@@ -0,0 +1,6 @@
namespace Hyperbar.Widget.Contextual.Windows;
public class ContextualWidgetConfiguration :
WidgetConfiguration
{
}
@@ -0,0 +1,13 @@
namespace Hyperbar.Widget.Contextual.Windows;
public class ContextualWidgetViewModel(ITemplateFactory templateFactory,
IServiceFactory serviceFactory,
IMediator mediator,
IDisposer disposer,
IEnumerable<IWidgetComponentViewModel> items) :
ObservableCollectionViewModel<IWidgetComponentViewModel>(serviceFactory, mediator, disposer, items),
IWidgetViewModel,
ITemplatedViewModel
{
public ITemplateFactory TemplateFactory => templateFactory;
}
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<UseRidGraph>true</UseRidGraph>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Hyperbar.Widget\Hyperbar.Widget.csproj" />
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
</ItemGroup>
</Project>