/// <inheritdoc/> ICloneable ICloneable.Clone() { var clone = new InterfaceTypeDictionary <V>(); foreach (var pair in _dictionary) { var cloneValue = pair.Value; if (pair.Value is ICloneable cloneable) { cloneValue = (V)cloneable.Clone(); } clone.Add(pair.Key, cloneValue); } return(clone); }
/// <inheritdoc/> public void Add(V value) => _dictionary.Add(value.GetType(), value);