public static IPreparedFeature New(string name, IObservable <IConfigEvent> publisher, ServerConfigugration serverConfigugration, IRepository <SeedUrlEntity, string> seeds) => Feature.Create(() => new HostMonitor(), c => new State(name, publisher, serverConfigugration, ImmutableList <HostApp> .Empty, HostApi.CreateOrGet(c.System), seeds));
public sealed record State(IObservable <IConfigEvent> EventPublisher, SourceList <string> Hosts, ServerConfigugration ServerConfigugration, IRepository <SeedUrlEntity, string> Seeds);
public record State(string Name, IObservable <IConfigEvent> Publisher, ServerConfigugration ServerConfigugration, ImmutableList <HostApp> Apps, HostApi Api, IRepository <SeedUrlEntity, string> Seeds);