Upgraded mooncore. Done required refactoring to function with new version

This commit is contained in:
2025-10-20 19:27:31 +00:00
parent 85392208c4
commit f6b71f4de6
51 changed files with 239 additions and 224 deletions

View File

@@ -9,8 +9,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.9"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.9" PrivateAssets="all"/>
<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" />
</ItemGroup>
<ItemGroup>

View File

@@ -5,16 +5,12 @@ using MoonlightServers.Frontend.Runtime;
var pluginLoader = new DevPluginLoader();
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();