restructure project for part 2
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user