Class NotifyCollectionChangedExtensions
- Namespace
- Avalonia.Collections
- Assembly
- Avalonia.Base.dll
public static class NotifyCollectionChangedExtensions
- Inheritance
-
NotifyCollectionChangedExtensions
- Inherited Members
Methods
GetWeakCollectionChangedObservable(INotifyCollectionChanged)
Gets a weak observable for the CollectionChanged event.
public static IObservable<NotifyCollectionChangedEventArgs> GetWeakCollectionChangedObservable(this INotifyCollectionChanged collection)
Parameters
collection
INotifyCollectionChangedThe collection.
Returns
- IObservable<NotifyCollectionChangedEventArgs>
An observable.
WeakSubscribe(INotifyCollectionChanged, Action<NotifyCollectionChangedEventArgs>)
Subscribes to the CollectionChanged event using a weak subscription.
public static IDisposable WeakSubscribe(this INotifyCollectionChanged collection, Action<NotifyCollectionChangedEventArgs> handler)
Parameters
collection
INotifyCollectionChangedThe collection.
handler
Action<NotifyCollectionChangedEventArgs>An action called when the collection event is raised.
Returns
- IDisposable
A disposable used to terminate the subscription.
WeakSubscribe(INotifyCollectionChanged, NotifyCollectionChangedEventHandler)
Subscribes to the CollectionChanged event using a weak subscription.
public static IDisposable WeakSubscribe(this INotifyCollectionChanged collection, NotifyCollectionChangedEventHandler handler)
Parameters
collection
INotifyCollectionChangedThe collection.
handler
NotifyCollectionChangedEventHandlerAn action called when the collection event is raised.
Returns
- IDisposable
A disposable used to terminate the subscription.