示例#1
0
 public void AddConnectionId(string newConnectionId)
 {
     if (ConnectionIds.Count >= MaxConnectionsPerUser)
     {
         //SendErrorMessage("Too many connections to the website. Please make sure you are not using same tool in multiply tabs.");
         //return;
         ConnectionIds.RemoveFirst();
     }
     if (!ConnectionIds.Contains(newConnectionId)) // only for low number of connection
     {
         ConnectionIds.AddLast(newConnectionId);
     }
     //_hub = GlobalHost.ConnectionManager.GetHubContext<SessionHub>();
     SetGuiState(_worker != null ? 1 : 0, newConnectionId);
     UpdateLastActivityTime();
 }