public void Subscribe(SubscribeMessage message) { message.DateReceived = DateTime.Now; var id = Guid.NewGuid(); var client = new WorkersHubClient(message, id.ToString(), this.Context.ConnectionId); this.session.AddWorker(client); }
public void RemoveWorker(WorkersHubClient client) { this.workers.Remove(client); this.WorkerConnected? .Invoke(new WorkerConnectedEventArgs(client.WorkerId, client.SubscribeMessage.UserId)); }