28 lines
868 B
C#
28 lines
868 B
C#
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Moonlight.Frontend;
|
|
using Moonlight.Frontend.Configuration;
|
|
using Moonlight.Frontend.Interfaces;
|
|
using MoonlightServers.Frontend.Infrastructure;
|
|
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)
|
|
{
|
|
}
|
|
} |