Added primaey commands extenion/plugin

This commit is contained in:
TheXamlGuy
2024-01-04 23:02:51 +00:00
parent 97270eeed4
commit d94add17f9
14 changed files with 120 additions and 47 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
using Hyperbar.Desktop.Contextual;
using Hyperbar.Desktop.Controls;
using Hyperbar.Desktop.Primary;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.UI.Xaml;
@@ -33,10 +34,11 @@ public partial class App :
// Commands
services.AddSomething<ContextualCommandBuilder>();
services.AddSomething<PrimaryCommandBuilder>();
services.AddTransient(provider =>
{
IEnumerable<ICommandViewModel> Resolve(IServiceProvider services)
static IEnumerable<ICommandViewModel> Resolve(IServiceProvider services)
{
foreach (ICommandContext commandContext in services.GetServices<ICommandContext>())
{
+1
View File
@@ -43,6 +43,7 @@
<ItemGroup>
<ProjectReference Include="..\Hyperbar.Desktop.Contextual\Hyperbar.Desktop.Contextual.csproj" />
<ProjectReference Include="..\Hyperbar.Desktop.Controls\Hyperbar.Desktop.Controls.csproj" />
<ProjectReference Include="..\Hyperbar.Desktop.Primary\Hyperbar.Desktop.Primary.csproj" />
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
</ItemGroup>
<ItemGroup>