Improved handling of moonlight plugins during startup, minimized host project code and moved startup handling to core
This commit is contained in:
28
Moonlight.Api/MoonlightPlugin.cs
Normal file
28
Moonlight.Api/MoonlightPlugin.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Reflection;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using SimplePlugin.Abstractions;
|
||||
|
||||
namespace Moonlight.Api;
|
||||
|
||||
public abstract class MoonlightPlugin : IPluginModule
|
||||
{
|
||||
protected MoonlightPlugin[] Plugins { get; private set; }
|
||||
|
||||
public void Initialize(MoonlightPlugin[] plugins)
|
||||
{
|
||||
Plugins = plugins;
|
||||
}
|
||||
|
||||
public virtual void PreBuild(WebApplicationBuilder builder)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void PostBuild(WebApplication application)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void PostMiddleware(WebApplication application)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user