Skip to content

Commit e8beb3c

Browse files
🔧 Fix(Workflow): 补注册 IRealPluginManagerBridge 接口映射-修复 Dashboard 启动时 GetRequiredService 失败、ServiceLocator 与 TriggerManager 构造注入经集成测试验证通过(4工作流读取/触发器注册/RealPluginManager单例共享均正常)
1 parent 87e6963 commit e8beb3c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

KitX Clients/KitX Workflow/KitX.Workflow/Hosting/ServiceCollectionExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public static IServiceCollection AddKitXWorkflow(this IServiceCollection service
5757
var deviceServer = provider.GetRequiredService<IDeviceServer>();
5858
return new RealPluginManager(pluginServer, eventService, deviceDiscoveryService, deviceServer, provider.GetRequiredService<IDeviceHttpClient>());
5959
});
60+
// Expose the same RealPluginManager instance under the bridge contract so the
61+
// host (Dashboard) can pre-resolve it to force eager singleton construction.
62+
services.AddSingleton<IRealPluginManagerBridge>(sp => sp.GetRequiredService<RealPluginManager>());
6063

6164
// KCS File Service
6265
services.AddSingleton<IKcsFileService, KcsFileService>();

0 commit comments

Comments
 (0)