|
@@ -44,22 +44,22 @@ public class CallCenterHub : Hub
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-public class RealtimeService : IRealtimeService, IScopeDependency
|
|
|
-{
|
|
|
- private readonly IHubContext<CallCenterHub> _hubContext;
|
|
|
- private readonly IUserCacheManager _userCacheManager;
|
|
|
+//public class RealtimeService : IRealtimeService, IScopeDependency
|
|
|
+//{
|
|
|
+// private readonly IHubContext<CallCenterHub> _hubContext;
|
|
|
+// private readonly IUserCacheManager _userCacheManager;
|
|
|
|
|
|
- public RealtimeService(IHubContext<CallCenterHub> hubContext, IUserCacheManager userCacheManager)
|
|
|
- {
|
|
|
- _hubContext = hubContext;
|
|
|
- _userCacheManager = userCacheManager;
|
|
|
- }
|
|
|
+// public RealtimeService(IHubContext<CallCenterHub> hubContext, IUserCacheManager userCacheManager)
|
|
|
+// {
|
|
|
+// _hubContext = hubContext;
|
|
|
+// _userCacheManager = userCacheManager;
|
|
|
+// }
|
|
|
|
|
|
- public async Task RingAsync(string userId, RingDto dto, CancellationToken cancellationToken)
|
|
|
- {
|
|
|
- var work = _userCacheManager.GetWorkByUser(userId);
|
|
|
- if (string.IsNullOrEmpty(work.SignalRId))
|
|
|
- throw new UserFriendlyException("无效signalr.connectionId");
|
|
|
- await _hubContext.Clients.Client(work.SignalRId).SendAsync("Ring", dto, cancellationToken);
|
|
|
- }
|
|
|
-}
|
|
|
+// public async Task RingAsync(string userId, RingDto dto, CancellationToken cancellationToken)
|
|
|
+// {
|
|
|
+// var work = _userCacheManager.GetWorkByUser(userId);
|
|
|
+// if (string.IsNullOrEmpty(work.SignalRId))
|
|
|
+// throw new UserFriendlyException("无效signalr.connectionId");
|
|
|
+// await _hubContext.Clients.Client(work.SignalRId).SendAsync("Ring", dto, cancellationToken);
|
|
|
+// }
|
|
|
+//}
|