终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425
  1. using Microsoft.AspNetCore.SignalR;
  2. namespace BPASmartClient.AgvApi
  3. {
  4. public class Factory
  5. {
  6. private volatile static Factory _Instance;
  7. public static Factory GetInstance => _Instance ?? (_Instance = new Factory());
  8. private Factory() { }
  9. public IHubCallerClients HubCallerClient { get; set; }
  10. public Task SendReport(object obj)
  11. {
  12. return HubCallerClient?.Caller.SendAsync("Report", obj);//Invoke客户端Report名称的方法
  13. }
  14. public Task SendUpstreamrequest(object obj)
  15. {
  16. return HubCallerClient?.Caller.SendAsync("Upstreamrequest", obj);//Invoke客户端Upstreamrequest名称的方法
  17. }
  18. }
  19. }