using GB5Shared.DALCache; using Microsoft.Extensions.DependencyInjection; namespace FrameworkBLL.SystemJob; /// /// A host's own module blanket-scanning FrameworkBLL/FrameworkDAL (to reuse a shared BLL like /// ISubscriptionBLL/IAttachmentUploadService) pulls in every other class in those assemblies too /// — including some whose real dependency only makes sense on FrameworkSL itself. Call this once /// alongside that scan to satisfy those without pulling in a whole separate host's library. /// Used by EntitlementModule.cs, DMSModule.cs, EcpModule.cs. /// public static class CrossHostFrameworkBllSupport { public static void AddFrameworkBllCrossHostSupport(this IServiceCollection services) { // SysJobShareBLL needs ISysJobHubNotifier. The real implementation // (FrameworkSL.SysJobHubNotifier) notifies SignalR clients connected to SysJobHub, which // only FrameworkSL itself ever maps — a no-op here is correct, not a workaround: there are // never any connected clients to notify on a host that doesn't host that hub. services.AddScoped(); // ReportViewBLL needs IDALCache, a GB5Shared type not covered by a FrameworkBLL/FrameworkDAL // assembly scan. services.AddScoped(); } private sealed class NoOpSysJobHubNotifier : ISysJobHubNotifier { public Task NotifyJobSharedAsync(int recipientUserId, int sysJobId, string sharedByName) => Task.CompletedTask; } }