Made moonlight able to compile and somehwat run with MoonCore.Blazor and the new logging system
This commit is contained in:
@@ -10,10 +10,18 @@ public class MoonlightService
|
||||
public WebApplication Application { get; set; } // Do NOT modify using a plugin
|
||||
|
||||
private readonly DateTime StartTimestamp = DateTime.UtcNow;
|
||||
private readonly CoreEvents CoreEvents;
|
||||
private readonly ILogger<MoonlightService> Logger;
|
||||
|
||||
public MoonlightService(CoreEvents coreEvents, ILogger<MoonlightService> logger)
|
||||
{
|
||||
CoreEvents = coreEvents;
|
||||
Logger = logger;
|
||||
}
|
||||
|
||||
public async Task Restart()
|
||||
{
|
||||
Logger.Info("Restarting moonlight");
|
||||
Logger.LogInformation("Restarting moonlight");
|
||||
|
||||
// Notify all users that this instance will restart
|
||||
await CoreEvents.OnMoonlightRestart.Invoke();
|
||||
|
||||
Reference in New Issue
Block a user