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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["# Firebase.Firestore.ListenerRegistration Class Reference\n\nFirebase.Firestore.ListenerRegistration\n=======================================\n\nRepresents a listener for either document or query snapshots that is returned from `Listen` methods.\n\nSummary\n-------\n\nThe listener can be removed by calling [ListenerRegistration.Stop](/docs/reference/unity/class/firebase/firestore/listener-registration#class_firebase_1_1_firestore_1_1_listener_registration_1a6c7f69812ca19b3acfeed3668d9b4655).\n\n### Inheritance\n\nInherits from: IDisposable\n\n| ### Properties ||\n|------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| [ListenerTask](#class_firebase_1_1_firestore_1_1_listener_registration_1aafd6719cda4c067ce42429b4c9af55f1) | `Task` A task that will complete when the listen operation finishes. |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Dispose](#class_firebase_1_1_firestore_1_1_listener_registration_1a4aba914d3acc380ca718ae0a42c9b237)`()` | `void` Calls the [Stop()](/docs/reference/unity/class/firebase/firestore/listener-registration#class_firebase_1_1_firestore_1_1_listener_registration_1a6c7f69812ca19b3acfeed3668d9b4655) method. |\n| [Stop](#class_firebase_1_1_firestore_1_1_listener_registration_1a6c7f69812ca19b3acfeed3668d9b4655)`()` | `void` Removes the listener being tracked by this [ListenerRegistration](/docs/reference/unity/class/firebase/firestore/listener-registration#class_firebase_1_1_firestore_1_1_listener_registration). |\n\nProperties\n----------\n\n### ListenerTask\n\n```c#\nTask ListenerTask\n``` \nA task that will complete when the listen operation finishes.\n\nThe 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.\n\nPublic functions\n----------------\n\n### Dispose\n\n```c#\nvoid Dispose()\n``` \nCalls the [Stop()](/docs/reference/unity/class/firebase/firestore/listener-registration#class_firebase_1_1_firestore_1_1_listener_registration_1a6c7f69812ca19b3acfeed3668d9b4655) method.\n\nNote 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. \n\n### Stop\n\n```c#\nvoid Stop()\n``` \nRemoves the listener being tracked by this [ListenerRegistration](/docs/reference/unity/class/firebase/firestore/listener-registration#class_firebase_1_1_firestore_1_1_listener_registration).\n\nIf [ListenerTask](/docs/reference/unity/class/firebase/firestore/listener-registration#class_firebase_1_1_firestore_1_1_listener_registration_1aafd6719cda4c067ce42429b4c9af55f1) is not completed, then it will transition to the `TaskStatus.RanToCompletion\"` state. After the initial call of this method, subsequent calls have no effect."]]