public sealed class FirestoreChangeListener
An ongoing "listen" or "watch" operation on either document or query snapshots.
This is returned from Listen
methods.
Namespace
Google.Cloud.FirestoreAssembly
Google.Cloud.Firestore.dll
Properties
ListenerTask
public Task ListenerTask { get; }
A task that will complete when the listen operation finishes.
Property Value | |
---|---|
Type | Description |
Task |
If a cancellation token provided by the caller (either when starting to listen or when calling StopAsync(CancellationToken)) is canceled, the task will finish in a state of Canceled. The task will finish in a state of Faulted if any other kind of exception was thrown, including any non-retriable RPC exceptions. The task will finish in a state of RanToCompletion if the listener stopped gracefully.
Methods
StopAsync(CancellationToken)
public Task StopAsync(CancellationToken cancellationToken = default(CancellationToken))
Requests that the client stops listening for changes. If a callback is in progress,
that will be allowed to complete, but cancelling cancellationToken
will
cancel the token passed to the callback, allowing for prompt cancellation if required.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken A cancellation token to cancel a callback if one is in progress. |
Returns | |
---|---|
Type | Description |
Task | The task to indicate listener completion. This returns the same as ListenerTask. |
This method must only be called once per listener.