void ICollection <KeyValuePair <string, object> > .Add(KeyValuePair <string, object> item) { if (string.IsNullOrEmpty(item.Key)) { throw RuntimeFailure.CannotSpecifyNullKey("item"); } SetProperty(item.Key, item.Value); }
bool ICollection <KeyValuePair <string, object> > .Remove(KeyValuePair <string, object> item) { if (string.IsNullOrEmpty(item.Key)) { throw RuntimeFailure.CannotSpecifyNullKey("item"); } object result; if (InnerMap.TryGetValue(item.Key, out result) && Equals(result, item.Value)) { ClearProperty(item.Key); return(true); } return(false); }