Started refactoring to be compatible with the changed nuget packages and the mooncore changes
This commit is contained in:
10
MoonlightServers.Frontend.Runtime/DevPluginLoader.cs
Normal file
10
MoonlightServers.Frontend.Runtime/DevPluginLoader.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using MoonCore.PluginFramework;
|
||||
using Moonlight.Client.Plugins;
|
||||
|
||||
namespace MoonlightServers.Frontend.Runtime;
|
||||
|
||||
[PluginLoader]
|
||||
public partial class DevPluginLoader : IPluginStartup
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.8" />
|
||||
<PackageReference Include="MoonCore.PluginFramework.Generator" Version="1.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.7" PrivateAssets="all"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MoonlightServers.Frontend\MoonlightServers.Frontend.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
20
MoonlightServers.Frontend.Runtime/Program.cs
Normal file
20
MoonlightServers.Frontend.Runtime/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using Moonlight.Client.Startup;
|
||||
using MoonlightServers.Frontend.Runtime;
|
||||
|
||||
var pluginLoader = new DevPluginLoader();
|
||||
pluginLoader.Initialize();
|
||||
|
||||
var startup = new Startup();
|
||||
|
||||
await startup.Initialize(pluginLoader.Instances);
|
||||
|
||||
var wasmHostBuilder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
|
||||
await startup.AddMoonlight(wasmHostBuilder);
|
||||
|
||||
var wasmApp = wasmHostBuilder.Build();
|
||||
|
||||
await startup.AddMoonlight(wasmApp);
|
||||
|
||||
await wasmApp.RunAsync();
|
||||
Reference in New Issue
Block a user