demo2
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using ShrinkApp.Starter.Basic;
|
||||
using ShrinkCommand.Integration.App;
|
||||
@@ -26,7 +28,16 @@ namespace ShrinkContext.AppAdapter.Tests
|
||||
ShrinkAppLoaderHost? host = null;
|
||||
try
|
||||
{
|
||||
host = new ShrinkAppLoaderHost(settings);
|
||||
var coreInstallers = new List<IShrinkAppModuleInstaller>();
|
||||
foreach (var installerType in ShrinkAppInstallers.GetDiscoveredInstallerTypes())
|
||||
{
|
||||
if (Activator.CreateInstance(installerType) is not IShrinkAppModuleInstaller installer)
|
||||
continue;
|
||||
if (installer.ModuleId is "shrink.network" or "shrink.command" or "shrink.datasaver")
|
||||
coreInstallers.Add(installer);
|
||||
}
|
||||
|
||||
host = new ShrinkAppLoaderHost(settings, coreInstallers);
|
||||
ShrinkAppBasicContextComposition.Configure(host);
|
||||
host.ApplyComposition(ShrinkAppBasicContextComposition.CreateDefaultDocument());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user