IPropertyBase

interface IPropertyBase<out T> : ISource<T> , IViewable<T>

Common base class of optional and non-optional properties. Shouldn't be used in client code.

Functions

Link copied to clipboard
abstract fun advise(lifetime: Lifetime, handler: (T) -> Unit)

Adds an event subscription. Every time an event occurs, the handler is called, receiving an instance of the event. The subscription is removed when the given lifetime expires.

Link copied to clipboard
open override fun view(lifetime: Lifetime, handler: (Lifetime, T) -> Unit)

Adds a subscription to changes of the contents of the object.

Properties

Link copied to clipboard
abstract val change: ISource<T>

Allows to subscribe to subsequent changes of the property value. Unlike subscribing to the property directly, the callback will not be immediately called with the current value of the property.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard