private void OnCollectionChanged(DictionaryChangedEventArgs <K, V> args) { if (DictionaryChanged != null) { DictionaryChanged(args); } }
public V this[K key] { get { return(dictionary[key]); } set { DictionaryChangedEventArgs <K, V> .ChangedAction action = ContainsKey(key) ? DictionaryChangedEventArgs <K, V> .ChangedAction.Replace : DictionaryChangedEventArgs <K, V> .ChangedAction.Add; dictionary[key] = value; OnCollectionChanged(new DictionaryChangedEventArgs <K, V>(new KeyValuePair <K, V>(key, value), action)); } }