CollectionChangedArgsExtensions Class
Definition
Section titled “Definition”public static class CollectionChangedArgsExtensionsInheritance object
Methods
Section titled “Methods”ToNotifyCollectionChangedEventArgs(CollectionChangedArgs)
Section titled “ToNotifyCollectionChangedEventArgs(CollectionChangedArgs)”Converts the CollectionChangedArgs<T> to a NotifyCollectionChangedEventArgs.
public static NotifyCollectionChangedEventArgs ToNotifyCollectionChangedEventArgs<T>(this CollectionChangedArgs<T> args)Parameters
Section titled “Parameters”args CollectionChangedArgs<T>
The current args.
Returns
Section titled “Returns”NotifyCollectionChangedEventArgs
The converted NotifyCollectionChangedEventArgs.
Exceptions
Section titled “Exceptions”NotSupportedException
args.Action is not supported.
TryGetNewValue<TKey, TValue>(CollectionChangedArgs<KeyValuePair<TKey, TValue>>, TKey, out TValue?)
Section titled “TryGetNewValue<TKey, TValue>(CollectionChangedArgs<KeyValuePair<TKey, TValue>>, TKey, out TValue?)”Helper method to get a value from the NewItems based on the given key.
public static bool TryGetNewValue<TKey, TValue>(this CollectionChangedArgs<KeyValuePair<TKey, TValue>> args, TKey key, out TValue? value)Parameters
Section titled “Parameters”args CollectionChangedArgs<KeyValuePair<TKey, TValue>>
The current args.
key TKey
The key to find the value for.
value TValue
The found value, if any.
Returns
Section titled “Returns”bool
true if a value was found; otherwise false.
TryGetOldValue<TKey, TValue>(CollectionChangedArgs<KeyValuePair<TKey, TValue>>, TKey, out TValue?)
Section titled “TryGetOldValue<TKey, TValue>(CollectionChangedArgs<KeyValuePair<TKey, TValue>>, TKey, out TValue?)”Helper method to get a value from the OldItems based on the given key.
public static bool TryGetOldValue<TKey, TValue>(this CollectionChangedArgs<KeyValuePair<TKey, TValue>> args, TKey key, out TValue? value)Parameters
Section titled “Parameters”args CollectionChangedArgs<KeyValuePair<TKey, TValue>>
The current args.
key TKey
The key to find the value for.
value TValue
The found value, if any.