NotifyCollectionChangedExtensionsWeakSubscribe(INotifyCollectionChanged, NotifyCollectionChangedEventHandler) Method
Subscribes to the CollectionChanged event using a weak subscription.
Namespace: Avalonia.CollectionsAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static IDisposable WeakSubscribe(
this INotifyCollectionChanged collection,
NotifyCollectionChangedEventHandler handler
)
<ExtensionAttribute>
Public Shared Function WeakSubscribe (
collection As INotifyCollectionChanged,
handler As NotifyCollectionChangedEventHandler
) As IDisposable
[<ExtensionAttribute>]
static member WeakSubscribe :
collection : INotifyCollectionChanged *
handler : NotifyCollectionChangedEventHandler -> IDisposable
- collection INotifyCollectionChanged
- The collection.
- handler NotifyCollectionChangedEventHandler
-
An action called when the collection event is raised.
IDisposableA disposable used to terminate the subscription.In Visual Basic and C#, you can call this method as an instance method on any object of type
INotifyCollectionChanged. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).