コード例 #1
0
        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);
        }
コード例 #2
0
 public void RemoveWorker(WorkersHubClient client)
 {
     this.workers.Remove(client);
     this.WorkerConnected?
     .Invoke(new WorkerConnectedEventArgs(client.WorkerId, client.SubscribeMessage.UserId));
 }