Added messaging pipeline
This commit is contained in:
@@ -9,6 +9,6 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Hyperbar.Lifecycles;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Hyperbar.Windows.Primary;
|
||||
@@ -6,10 +5,7 @@ namespace Hyperbar.Windows.Primary;
|
||||
public class PrimaryWidgetBuilder :
|
||||
IWidgetBuilder
|
||||
{
|
||||
public void Create(IServiceCollection services)
|
||||
{
|
||||
services.AddConfiguration<PrimaryWidgetConfiguration>()
|
||||
.AddTransient<PrimaryWidgetViewModel>();
|
||||
}
|
||||
public void Create(IServiceCollection services) => services.AddConfiguration<PrimaryWidgetConfiguration>()
|
||||
.AddWidgetTemplate<PrimaryWidgetViewModel>();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
using Hyperbar.Lifecycles;
|
||||
using Hyperbar.Templates;
|
||||
|
||||
namespace Hyperbar.Windows.Primary;
|
||||
namespace Hyperbar.Windows.Primary;
|
||||
|
||||
public class PrimaryWidgetViewModel :
|
||||
WidgetViewModelBase
|
||||
{
|
||||
public PrimaryWidgetViewModel(ITemplateFactory templateFactory) : base(templateFactory)
|
||||
public PrimaryWidgetViewModel(ITemplateFactory templateFactory,
|
||||
IServiceFactory serviceFactory) : base(templateFactory, serviceFactory)
|
||||
{
|
||||
;
|
||||
|
||||
Add<WidgetButtonViewModel>("test 1", new Action(() => {
|
||||
|
||||
}));
|
||||
Add<WidgetButtonViewModel>("test 2", new Action(() => { }));
|
||||
Add<WidgetButtonViewModel>("test 4", new Action(() => { }));
|
||||
Add<WidgetButtonViewModel>("test 5", new Action(() => { }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user