Ejemplo n.º 1
0
 public static void Push(HttpConnection connection)
 {
     string ssid = connection.SSID.ToString("N");
     HttpConnection old;
     if (_dict.TryGetValue(ssid, out old))
     {
         _dict.TryUpdate(ssid, connection, old);
     }
     else
     {
         _dict.TryAdd(ssid, connection);
     }
 }
Ejemplo n.º 2
0
 public static void Remove(HttpConnection connection)
 {
     string ssid = connection.SSID.ToString("N");
     HttpConnection val;
     _dict.TryRemove(ssid, out val);
 }