public void CopyFrom(InheritableDictionary source) { if (null == source) { throw new ArgumentNullException(nameof(source)); } foreach (string key in source.LocalKeys()) { Set(key, source.Get(key, false)); } }
public IEnumerable <string> AllKeys() { List <string> existingKeys = new List <string>(); InheritableDictionary pointer = this; do { foreach (string key in pointer.LocalKeys()) { if (!existingKeys.Contains(key)) { existingKeys.Add(key); yield return(key); } } pointer = pointer.Parent; } while (null != pointer); }