Beispiel #1
0
        /// <summary>
        ///     Removes an instance at the specified index
        /// </summary>
        /// <param name="index"></param>
        public new void RemoveAt(int index)
        {
            var item = this[index];

            base.RemoveAt(index);
            GlobalPool.RemoveInstance(item);
        }
Beispiel #2
0
 /// <summary>
 ///     Removes an instance from the dictionary
 /// </summary>
 /// <param name="key">The instance to remove</param>
 /// <returns>
 ///     <see langword="true" /> if the instance was in dictionary and removed, otherwise <see langword="false" />
 /// </returns>
 public new bool Remove(object key)
 {
     if (!base.Remove(key))
     {
         return(false);
     }
     GlobalPool.RemoveInstance(key);
     return(true);
 }