feat: add NuGet and Godot distribution
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#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<ShrinkCommandAppComponent>("shrink.command");
|
||||
host.Register<ShrinkDataSaverAppComponent>("shrink.datasaver");
|
||||
host.Register<ShrinkNetworkAppComponent>("shrink.network");
|
||||
return host;
|
||||
}
|
||||
|
||||
public static IReadOnlyList<ShrinkLoaderEntry> 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
|
||||
})
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user