Class INotifyCollectionChangedExtensions
Extension methods for INotifyCollectionChanged.
Inherited Members
Namespace: Phoenix.BotBrain.Extensions
Assembly: Phoenix.Plugin.BotBrain.Shared.dll
Syntax
public static class INotifyCollectionChangedExtensions
Methods
View SourceOnItemAdded(INotifyCollectionChanged, Action<object?>)
Registers an event handler for when an item is added.
Declaration
public static NotifyCollectionChangedEventHandler OnItemAdded(this INotifyCollectionChanged self, Action<object?> action)
Parameters
Type | Name | Description |
---|---|---|
INotifyCollectionChanged | self | The object being extended. |
Action<object> | action | The action to apply to each item. |
Returns
Type | Description |
---|---|
NotifyCollectionChangedEventHandler | The event handler. |
OnItemAdded<T2>(INotifyCollectionChanged, Action<T2>)
Creates an event handler for when an item of type T2
is added.
Declaration
public static NotifyCollectionChangedEventHandler OnItemAdded<T2>(this INotifyCollectionChanged self, Action<T2> action) where T2 : class
Parameters
Type | Name | Description |
---|---|---|
INotifyCollectionChanged | self | The object being extended. |
Action<T2> | action | The action. |
Returns
Type | Description |
---|---|
NotifyCollectionChangedEventHandler | The event handler. |
Type Parameters
Name | Description |
---|---|
T2 | The item type. |