public void ExecuteNotifyNotificationsClientsTransaction(NotifyManyNotificationsClientsRequest request) { var connectionsIdList = new List <string>(); foreach (var notifyClient in request.NotificationsClients) { RegisterNotification(notifyClient, request.Owner, request.ApplicationId, request.UserContextId, out Notification notification); RegisterClient(notifyClient, request.UserContextId, notification); AddConnectionsId(connectionsIdList, notifyClient.UsersId, request.ApplicationId); } if (HasClientConnected(connectionsIdList)) { NotificationClientService.NotifyClients(connectionsIdList); } }
private void Notify(IList <string> usersId, int applicationId) { var connectionsId = MemoryCacheService.GetConnectionId(usersId, applicationId); NotificationClientService.NotifyClients(connectionsId); }