终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Factory.cs 716 B

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. }