Skip to main content

NotifyCollectionChangedExtensions Class

Definition

Assembly:Avalonia.Base
Package:Avalonia
public class NotifyCollectionChangedExtensions

Inheritance: object -> NotifyCollectionChangedExtensions

Methods

NameDescription
GetWeakCollectionChangedObservableGets a weak observable for the CollectionChanged event.
WeakSubscribe (2 overloads)No summary available.

GetWeakCollectionChangedObservable Method

Gets a weak observable for the CollectionChanged event.

public IObservable<System.Collections.Specialized.NotifyCollectionChangedEventArgs> GetWeakCollectionChangedObservable(System.Collections.Specialized.INotifyCollectionChanged collection)

Parameters

collection System.Collections.Specialized.INotifyCollectionChanged

The collection.

Returns

IObservable<System.Collections.Specialized.NotifyCollectionChangedEventArgs>

An observable.

WeakSubscribe overloads

WeakSubscribe Method

public IDisposable WeakSubscribe(System.Collections.Specialized.INotifyCollectionChanged collection, Action<System.Collections.Specialized.NotifyCollectionChangedEventArgs> handler)
Parameters

collection System.Collections.Specialized.INotifyCollectionChanged

handler Action<System.Collections.Specialized.NotifyCollectionChangedEventArgs>

Returns

IDisposable

WeakSubscribe Method

Subscribes to the CollectionChanged event using a weak subscription.

public IDisposable WeakSubscribe(System.Collections.Specialized.INotifyCollectionChanged collection, System.Collections.Specialized.NotifyCollectionChangedEventHandler handler)
Parameters

collection System.Collections.Specialized.INotifyCollectionChanged

The collection.

handler System.Collections.Specialized.NotifyCollectionChangedEventHandler

An action called when the collection event is raised.

Returns

IDisposable

A disposable used to terminate the subscription.