|
12345678910111213141516171819202122232425 |
- 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);//Invoke客户端Report名称的方法
- }
-
- public Task SendUpstreamrequest(object obj)
- {
- return HubCallerClient?.Caller.SendAsync("Upstreamrequest", obj);//Invoke客户端Upstreamrequest名称的方法
- }
-
- }
- }
|