#nullable enable using System.Collections.Generic; using ShrinkApp; using ShrinkCommand.Integration.App; using ShrinkContext; using ShrinkContext.AppAdapter; using ShrinkDataSaver.Integration.App; using ShrinkNetwork.Integration.App; namespace ShrinkApp.Starter.Basic; public static class ShrinkBasicComposition { public static ShrinkContextAppHost CreateHost(ShrinkAppServices? services = null) { var host = new ShrinkContextAppHost(services); host.Register("shrink.command"); host.Register("shrink.datasaver"); host.Register("shrink.network"); return host; } public static IReadOnlyList CreateEntries(ShrinkAppServices services, ShrinkNetworkAppModuleConfig? network = null) => new[] { new ShrinkLoaderEntry("datasaver", "shrink.datasaver", services), new ShrinkLoaderEntry("command", "shrink.command", services), new ShrinkLoaderEntry("network", "shrink.network", network ?? new ShrinkNetworkAppModuleConfig { Services = services }) }; }