using Microsoft.AspNetCore.SignalR; namespace BPASmartClient.AgvApi { public class Factory { private volatile static Factory _Instance; public static Factory GetInstance => _Instance ?? (_Instance = new Factory()); private Factory() { } public IHubCallerClients HubCallerClient { get; set; } public Task SendReport(object obj) { return HubCallerClient?.Caller.SendAsync("Report", obj); } public Task SendUpstreamrequest(object obj) { return HubCallerClient?.Caller.SendAsync("Upstreamrequest", obj); } } }