Handle that points to a previously subscribed listener. This handle is returned when a subscription occurs and can be used to remove the subscription.
The handle is Disposable, so using can unsubscribe the listener at the end of a block:
Disposable
using
{ using handle = event.subscribe(listener); // listener receives events here}// listener is unsubscribed here Copy
{ using handle = event.subscribe(listener); // listener receives events here}// listener is unsubscribed here
Unsubscribe, the listener will no longer receive events.
Handle that points to a previously subscribed listener. This handle is returned when a subscription occurs and can be used to remove the subscription.
The handle is
Disposable, sousingcan unsubscribe the listener at the end of a block: