Made moonlight able to compile and somehwat run with MoonCore.Blazor and the new logging system

This commit is contained in:
Marcel Baumgartner
2024-06-22 11:28:58 +02:00
parent 2060b9140f
commit 42e9f18fb6
102 changed files with 909 additions and 798 deletions

View File

@@ -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();