Firestore API - Class QuerySnapshot (3.5.1)

public sealed class QuerySnapshot : IReadOnlyList<DocumentSnapshot>, IReadOnlyCollection<DocumentSnapshot>, IEnumerable<DocumentSnapshot>, IEnumerable, IEquatable<QuerySnapshot>

Reference documentation and code samples for the Firestore API class QuerySnapshot.

An immutable snapshot of complete query results.

Inheritance

object > QuerySnapshot

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Properties

Changes

public IReadOnlyList<DocumentChange> Changes { get; }

The changes in the documents.

Property Value
TypeDescription
IReadOnlyListDocumentChange

Count

public int Count { get; }

Returns the number of documents in this query snapshot.

Property Value
TypeDescription
int

The number of documents in this query snapshot.

Documents

public IReadOnlyList<DocumentSnapshot> Documents { get; }

The documents in the snapshot.

Property Value
TypeDescription
IReadOnlyListDocumentSnapshot

this[int]

public DocumentSnapshot this[int index] { get; }

Returns the document snapshot with the specified index within this query snapshot.

Parameter
NameDescription
indexint

The index of the document to return.

Property Value
TypeDescription
DocumentSnapshot

The document snapshot with the specified index within this query snapshot.

Exceptions
TypeDescription
ArgumentOutOfRangeException

index is less than 0, or greater than or equal to Count.

Query

public Query Query { get; }

The query producing this snapshot.

Property Value
TypeDescription
Query

ReadTime

public Timestamp ReadTime { get; }

The time at which the snapshot was read.

Property Value
TypeDescription
Timestamp

Methods

GetEnumerator()

public IEnumerator<DocumentSnapshot> GetEnumerator()

Returns an enumerator that iterates through the collection.

Returns
TypeDescription
IEnumeratorDocumentSnapshot

An enumerator that can be used to iterate through the collection.

GetHashCode()

public override int GetHashCode()

Serves as the default hash function.

Returns
TypeDescription
int

A hash code for the current object.

Overrides