Skip to main content

LightweightObservableBase<T> Class

Definition

Assembly:Avalonia.Controls.TreeDataGrid
Package:Avalonia.Controls.TreeDataGrid

Lightweight base class for observable implementations.

public class LightweightObservableBase<T>

Inheritance: object -> LightweightObservableBase<T>

Implements: IObservable<>

Remarks

This is an experimental API that is subject to change or removal without notice.

ObservableBase{T} is rather heavyweight in terms of allocations and memory usage. This class provides a more lightweight base for some internal observable types in the Avalonia framework.

Methods

NameDescription
SubscribeNo summary available.

Subscribe Method

public IDisposable Subscribe(IObserver<T> observer)

Parameters

observer IObserver<T>

Returns

IDisposable

Properties

NameDescription
HasObserversGets a value indicating whether this observable has any observers.

HasObservers Property

Gets a value indicating whether this observable has any observers.

public bool HasObservers { get; set; }