Table of Contents

Method RouteCollectionChange

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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

sender object

The source of the collection change event. This may be null.

e NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing details about the collection change.

router ICollectionChangeRouter

The 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.