public void AddReceiver(MsmqConnectedClient client) { MsmqConnectedClient existing = _clients.Single(client.Id); if (existing != null) { _clients.Remove(existing.Id); } _clients.Add(client); }
public void RemoveReceiver(Guid receiverId) { WcfConnectedClient client = _clients.Single(receiverId); if (client != null) { _clients.Remove(client.Id); } }
public void AddReceiver(ConnectedClientData clientData) { HubConnectedClient client = new HubConnectedClient(); client.ConnectionId = Context.ConnectionId; client.Id = clientData.Id; client.PublicKey = clientData.PublicKey; HubConnectedClient existing = _clients.Single(client.Id); if (existing != null) { Groups.Remove(existing.ConnectionId, ReceiverGroup); _clients.Remove(client.Id); } _clients.Add(client); Groups.Add(client.ConnectionId, ReceiverGroup); OnConnectedClientAdded(client); }