Upgraded mooncore versions. Cleaned up code, especially startup code. Changed versions

This commit is contained in:
2025-10-05 16:07:27 +00:00
parent d2ef59d171
commit 9ab69ffef5
43 changed files with 429 additions and 632 deletions

View File

@@ -12,8 +12,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.8" />
<PackageReference Include="MoonCore.PluginFramework.Generator" Version="1.0.2" />
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.9" />
<PackageReference Include="MoonCore.PluginFramework.Generator" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.9" PrivateAssets="all" />

View File

@@ -5,16 +5,12 @@ using Moonlight.Client.Startup;
var pluginLoader = new PluginLoader();
pluginLoader.Initialize();
var startup = new Startup();
var builder = WebAssemblyHostBuilder.CreateDefault(args);
await startup.InitializeAsync(pluginLoader.Instances);
builder.AddMoonlight(pluginLoader.Instances);
var wasmHostBuilder = WebAssemblyHostBuilder.CreateDefault(args);
var app = builder.Build();
await startup.AddMoonlightAsync(wasmHostBuilder);
app.ConfigureMoonlight(pluginLoader.Instances);
var wasmApp = wasmHostBuilder.Build();
await startup.AddMoonlightAsync(wasmApp);
await wasmApp.RunAsync();
await app.RunAsync();