Recreated plugin with new project template. Started implementing server system daemon
This commit is contained in:
28
MoonlightServers.Frontend/Startup.cs
Normal file
28
MoonlightServers.Frontend/Startup.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moonlight.Frontend;
|
||||
using Moonlight.Frontend.Configuration;
|
||||
using Moonlight.Frontend.Interfaces;
|
||||
using MoonlightServers.Frontend.Implementations;
|
||||
using SimplePlugin.Abstractions;
|
||||
|
||||
namespace MoonlightServers.Frontend;
|
||||
|
||||
[PluginModule]
|
||||
public sealed class Startup : MoonlightPlugin
|
||||
{
|
||||
public override void PreBuild(WebAssemblyHostBuilder builder)
|
||||
{
|
||||
builder.Services.AddSingleton<IPermissionProvider, PermissionProvider>();
|
||||
builder.Services.AddSingleton<ISidebarProvider, SidebarProvider>();
|
||||
|
||||
builder.Services.Configure<NavigationAssemblyOptions>(options =>
|
||||
{
|
||||
options.Assemblies.Add(typeof(Startup).Assembly);
|
||||
});
|
||||
}
|
||||
|
||||
public override void PostBuild(WebAssemblyHost application)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user