Stay organized with collections
Save and categorize content based on your preferences.
Metadata about a snapshot, describing the state of the snapshot.
Summary
Constructors and Destructors
|
SnapshotMetadata(bool hasPendingWrites, bool isFromCache)
Creates a new instance of the class.
|
Properties
|
HasPendingWrites
|
bool
true if the snapshot contains the result of local writes (e.g.
|
IsFromCache
|
bool
true if the snapshot was created from cached data rather than guaranteed up-to-date server data.
|
Properties
Public functions
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-09-08 UTC.
[null,null,["Last updated 2021-09-08 UTC."],[],[],null,["# Firebase.Firestore.SnapshotMetadata Class Reference\n\nFirebase.Firestore.SnapshotMetadata\n===================================\n\nMetadata about a snapshot, describing the state of the snapshot.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SnapshotMetadata](#class_firebase_1_1_firestore_1_1_snapshot_metadata_1ac77d05832cdc11ea503c5a709f8b7f4d)`(bool hasPendingWrites, bool isFromCache)` Creates a new instance of the class. ||\n\n| ### Properties ||\n|------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| [HasPendingWrites](#class_firebase_1_1_firestore_1_1_snapshot_metadata_1ad82a4beede53aa1cdb4ca4d522406527) | `bool` `true` if the snapshot contains the result of local writes (e.g. |\n| [IsFromCache](#class_firebase_1_1_firestore_1_1_snapshot_metadata_1a71762ba2d51746a0285af93a1a1dcf44) | `bool` `true` if the snapshot was created from cached data rather than guaranteed up-to-date server data. |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|\n| [Equals](#class_firebase_1_1_firestore_1_1_snapshot_metadata_1adbcb3ccd1f2fbdaa508234964c8c2307)`(object obj)` | `override bool` |\n| [Equals](#class_firebase_1_1_firestore_1_1_snapshot_metadata_1a602485aba60748fc9977b5d398082d13)`(`[SnapshotMetadata](/docs/reference/unity/class/firebase/firestore/snapshot-metadata#class_firebase_1_1_firestore_1_1_snapshot_metadata)` other)` | `bool` Compares this snapshot metadata with another for equality. |\n| [GetHashCode](#class_firebase_1_1_firestore_1_1_snapshot_metadata_1a7be3512a85742371ff57611327bd3f33)`()` | `override int` |\n\nProperties\n----------\n\n### HasPendingWrites\n\n```c#\nbool HasPendingWrites\n``` \n`true` if the snapshot contains the result of local writes (e.g.\n\n`SetAsync` or `UpdateAsync` calls) that have not yet been committed to the backend. If your listener has opted into metadata updates (via `MetadataChanges.Include`) you will receive another snapshot with `HasPendingWrites` equal to `false` once the writes have been committed to the backend. \n\n### IsFromCache\n\n```c#\nbool IsFromCache\n``` \n`true` if the snapshot was created from cached data rather than guaranteed up-to-date server data.\n\nIf your listener has opted into metadata updates (via `MetadataChanges.Include`) you will receive another snapshot with `IsFromCache` equal to `false` once the client has received up-to-date data from the backend.\n\nPublic functions\n----------------\n\n### Equals\n\n```c#\noverride bool Equals(\n object obj\n)\n``` \n\n### Equals\n\n```c#\nbool Equals(\n SnapshotMetadata other\n)\n``` \nCompares this snapshot metadata with another for equality.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |---------|-------------------------------------------------| | `other` | The snapshot metadata to compare this one with. | |\n| **Returns** | `true` if this snapshot metadata is equal to *other* ; `false` otherwise. |\n\n### GetHashCode\n\n```c#\noverride int GetHashCode()\n``` \n\n### SnapshotMetadata\n\n```c#\n SnapshotMetadata(\n bool hasPendingWrites,\n bool isFromCache\n)\n``` \nCreates a new instance of the class.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------------------|-----------------------------------------------------| | `hasPendingWrites` | Indicates whether this snapshot has pending writes. | | `isFromCache` | Indicates whether this snapshot is from the cache. | |"]]