Firebase. Firestore. ListenerRegistration
Represents a listener for either document or query snapshots that is returned from Listen
methods.
Summary
The listener can be removed by calling ListenerRegistration.Stop.
Inheritance
Inherits from: IDisposable
Properties |
|
---|---|
ListenerTask
|
Task
A task that will complete when the listen operation finishes.
|
Public functions |
|
---|---|
Dispose()
|
void
Calls the Stop() method.
|
Stop()
|
void
Removes the listener being tracked by this
ListenerRegistration . |
Properties
ListenerTask
Task ListenerTask
A task that will complete when the listen operation finishes.
The task will finish in a state of TaskStatus.Faulted
if any kind of exception was thrown, including any non-retriable RPC exceptions. The task will finish in a state of TaskStatus.RanToCompletion"
if the listener stopped gracefully.
Public functions
Dispose
void Dispose()
Calls the Stop() method.
Note that this method is not invoked by the destructor. This is intentional as this class does not handle unmanaged resources. The usage of the IDisposable interface does however enable using this class with external reactive libraries that expect it.
Stop
void Stop()
Removes the listener being tracked by this ListenerRegistration
.
If ListenerTask is not completed, then it will transition to the TaskStatus.RanToCompletion"
state. After the initial call of this method, subsequent calls have no effect.