/Collections/Specialized/ObservableDictionary.cs |
@@ -41,7 +41,7 @@ |
|
public void Add(KeyValuePair<K, V> item) |
{ |
((IDictionary<K, V>) store).Add(item); |
((IDictionary<K, V>)store).Add(item); |
IsVirgin = false; |
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item)); |
} |
@@ -64,7 +64,7 @@ |
|
public bool Contains(KeyValuePair<K, V> item) |
{ |
return ((IDictionary<K, V>) store).Contains(item); |
return ((IDictionary<K, V>)store).Contains(item); |
} |
|
public bool ContainsKey(K key) |
@@ -74,17 +74,17 @@ |
|
public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) |
{ |
((IDictionary<K, V>) store).CopyTo(array, arrayIndex); |
((IDictionary<K, V>)store).CopyTo(array, arrayIndex); |
} |
|
public IEnumerator<KeyValuePair<K, V>> GetEnumerator() |
{ |
return ((IDictionary<K, V>) store).GetEnumerator(); |
return ((IDictionary<K, V>)store).GetEnumerator(); |
} |
|
public bool Remove(KeyValuePair<K, V> item) |
{ |
var removed = ((IDictionary<K, V>) store).Remove(item); |
var removed = ((IDictionary<K, V>)store).Remove(item); |
IsVirgin = false; |
if (removed) |
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item)); |
@@ -111,7 +111,7 @@ |
|
IEnumerator IEnumerable.GetEnumerator() |
{ |
return ((IDictionary<K, V>) store).GetEnumerator(); |
return ((IDictionary<K, V>)store).GetEnumerator(); |
} |
|
public event NotifyCollectionChangedEventHandler CollectionChanged; |
@@ -121,4 +121,4 @@ |
CollectionChanged?.Invoke(this, args); |
} |
} |
} |
} |