public sealed override void AddAll(IEnumerable <KeyValuePair <TK, TV> > enumer) { this.Modify( () => this.AddAllImpl(enumer), () => { List <TK> keys = new List <TK>(); List <TV> values = new List <TV>(); foreach (KeyValuePair <TK, TV> kvp in enumer) { if (!this.ContainsKey(kvp.Key)) { keys.Add(kvp.Key); values.Add(kvp.Value); } } return(DictionaryEventArgs.NewEventAddRange(keys, values)); }); }
public sealed override void Add(TK key, TV value) { this.Modify( () => this.AddImpl(key, value), () => DictionaryEventArgs.NewEventAddRange(new[] { key }, new[] { value })); }