/// <inheritdoc /> public bool Remove <T>() where T : TBase { ITypeSetContracts.Remove(this); return(this.values.Remove(typeof(T))); }
/// <inheritdoc /> public bool Add <T>(T value) where T : TBase { ITypeSetContracts.Add(this, value); return(this.Add(typeof(T), value)); }
/// <inheritdoc /> public bool Add(Type key, TBase value) { ITypeSetContracts.Add(this, key, value); if (this.values.ContainsKey(key)) { return(false); } else { this.values[key] = value; return(true); } }
/// <inheritdoc /> public TBase this[Type key] { get { ITypeSetContracts.IndexerGet(this, key); return(this.values[key]); } set { ITypeSetContracts.IndexerSet(this, key, value); this.values[key] = value; } }
/// <inheritdoc /> public bool Add(TBase value) { ITypeSetContracts.Add(this, value); return(this.Add(value.GetType(), value)); }
/// <inheritdoc /> public bool Add(KeyValuePair <Type, TBase> item) { ITypeSetContracts.Add(this, item); return(this.Add(item.Key, item.Value)); }