CollectionChangedArgsExtensions Class
Definition
Section titled “Definition”public static class CollectionChangedArgsExtensionsInheritance object
Methods
Section titled “Methods”ToNotifyCollectionChangedEventArgs<T>(CollectionChangedArgs<T>)
Section titled “ToNotifyCollectionChangedEventArgs<T>(CollectionChangedArgs<T>)”Converts the Hertzole.ScriptableValues.CollectionChangedArgs1 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 Hertzole.ScriptableValues.CollectionChangedArgs1.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
https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true if a value was found; otherwise https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">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 Hertzole.ScriptableValues.CollectionChangedArgs1.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.
Returns
Section titled “Returns”bool
https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true if a value was found; otherwise https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false.