Added messaging pipeline
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
using Hyperbar.Lifecycles;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Hyperbar.Extensions.Contextual;
|
||||
namespace Hyperbar.Widget.Contextual;
|
||||
|
||||
public class ContextualWidgetBuilder :
|
||||
IWidgetBuilder
|
||||
{
|
||||
public void Create(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
public void Create(IServiceCollection services) => services
|
||||
.AddConfiguration<ContextualWidgetConfiguration>()
|
||||
.AddWidgetTemplate<ContextualWidgetViewModel>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Hyperbar.Extensions.Contextual;
|
||||
namespace Hyperbar.Widget.Contextual;
|
||||
|
||||
public class ContextualWidgetConfiguration
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Hyperbar.Lifecycles;
|
||||
using Hyperbar.Templates;
|
||||
namespace Hyperbar.Widget.Contextual;
|
||||
|
||||
namespace Hyperbar.Extensions.Contextual;
|
||||
|
||||
public class ContextualWidgetViewModel(ITemplateFactory templateFactory) :
|
||||
IWidgetViewModel,
|
||||
ITemplatedViewModel
|
||||
public class ContextualWidgetViewModel :
|
||||
WidgetViewModelBase
|
||||
{
|
||||
public ITemplateFactory TemplateFactory { get; } = templateFactory;
|
||||
}
|
||||
public ContextualWidgetViewModel(ITemplateFactory templateFactory,
|
||||
IServiceFactory serviceFactory) : base(templateFactory, serviceFactory)
|
||||
{
|
||||
Add<WidgetButtonViewModel>();
|
||||
Add<WidgetButtonViewModel>();
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<RootNamespace>Hyperbar.Windows.Contextual</RootNamespace>
|
||||
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<UseRidGraph>true</UseRidGraph>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.231202003-experimental1" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.25936-preview" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Win32\Hyperbar.Windows.Win32.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user