Пример #1
0
 /// <summary>
 /// Removes a client from the data structures and calls the Release method on it.
 /// </summary>
 /// <param name="referredEntity"></param>
 public void RemoveClient(NetworkEntity referredEntity)
 {
     lock (this.clientsEngine)
     {
         if (clientsEngine.ContainsKey(referredEntity.Id))
         {
             referredEntity.Release();
             this.clients.Remove(referredEntity);
             this.clientsEngine.Remove(referredEntity.Id);
         }
     }
 }