Пример #1
0
 public void Remove(ChatClientHandler handler)
 {
     if (ContainsKey(handler.GetHashCode()))
     {
         this._collection.Remove(handler.GetHashCode());
     }
 }
Пример #2
0
 public void Add(ChatClientHandler handler)
 {
     if (!ContainsKey(handler.GetHashCode()))
     {
         this._collection.Add(handler.GetHashCode(), handler);
     }
 }
Пример #3
0
        public ChatClientHandler Get(string userUniqueID)
        {
            ChatClientHandler handler = default(ChatClientHandler);

            foreach (var item in this._collection)
            {
                if ((item.Value).UserUniqueID.Equals(userUniqueID, StringComparison.InvariantCultureIgnoreCase))
                {
                    handler = item.Value;
                    break;
                }
            }
            return(handler);
        }