Started implementing server service and daemon controllers

This commit is contained in:
2025-09-15 21:47:07 +02:00
parent 32f447d268
commit 91fb15a03e
11 changed files with 318 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
using System.Collections;
using MoonlightServers.Daemon.ServerSystem.Enums;
using MoonlightServers.Daemon.ServerSystem.Interfaces;
using MoonlightServers.Daemon.ServerSystem.Models;
@@ -39,7 +40,8 @@ public partial class Server : IAsyncDisposable
IRestorer restorer,
IRuntime runtime,
IStatistics statistics,
IServerStateHandler[] handlers
IEnumerable<IServerStateHandler> handlers,
IEnumerable<IServerComponent> additionalComponents
)
{
Logger = logger;
@@ -54,13 +56,15 @@ public partial class Server : IAsyncDisposable
Runtime = runtime;
Statistics = statistics;
AllComponents =
IEnumerable<IServerComponent> defaultComponents =
[
Console, RuntimeFileSystem, InstallationFileSystem, Installation, OnlineDetector, Reporter, Restorer,
Runtime, Statistics
];
Handlers = handlers;
AllComponents = defaultComponents.Concat(additionalComponents).ToArray();
Handlers = handlers.ToArray();
}
private void ConfigureStateMachine(ServerState initialState)