/// <summary> /// Adds a new instance and its value to the dictionary /// </summary> /// <param name="key">The instance</param> /// <param name="value">The instance value</param> public new void Add(object key, T value) { var contains = ContainsKey(key); base.Add(key, value); // may raise an exception, or not? if (!contains) { GlobalPool.AddInstance(key); } }
/// <summary> /// Adds a new instance to the list /// </summary> /// <param name="item">The instance to add</param> public new void Add(object item) { base.Add(item); GlobalPool.AddInstance(item); }