Method RouteCollectionChange
RouteCollectionChange(object?, NotifyCollectionChangedEventArgs, ICollectionChangeRouter)
Routes a collection change event to the appropriate handler based on the action type.
public static bool RouteCollectionChange(object? sender, NotifyCollectionChangedEventArgs e, ICollectionChangeRouter router)
Parameters
senderobjectThe source of the collection change event. This may be null.
eNotifyCollectionChangedEventArgsThe NotifyCollectionChangedEventArgs instance containing details about the collection change.
routerICollectionChangeRouterThe ICollectionChangeRouter responsible for handling the collection change actions.
Returns
- bool
true if the collection change action was successfully routed and handled; false if the action type is not supported.
Remarks
This method processes the collection change event by invoking
the corresponding method on the provided router based on
the NotifyCollectionChangedAction specified in e.
Supported actions include Add, Remove, Replace, Move, and Reset.