NotifyCollectionChangedExtensions.

WeakSubscribe(INotifyCollectionChanged, Action<NotifyCollectionChangedEventArgs>) Method

Summary

Subscribes to the CollectionChanged event using a weak subscription.

Syntax

public static IDisposable WeakSubscribe(this INotifyCollectionChanged collection, Action<NotifyCollectionChangedEventArgs> handler)

Parameters

Name Type Description
collection INotifyCollectionChanged The collection.
handler Action<NotifyCollectionChangedEventArgs> An action called when the collection event is raised.

Return Value

Type Description
IDisposable A disposable used to terminate the subscription.