4.6.0 (latest) 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.1 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.5.0 2.4.0 2.3.1

    public sealed class AggregateQuerySnapshot : IEquatable<AggregateQuerySnapshot>

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

An immutable snapshot of aggregate query results.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> AggregateQuerySnapshot

## Implements

[IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AggregateQuerySnapshot](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.AggregateQuerySnapshot)

## Inherited Members

[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Firestore](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore)

## Assembly

Google.Cloud.Firestore.dll

## Properties

### Count

    public long? Count { get; }

Number of documents that matches the query. May be null when count aggregation is not applied on the Query.
Note that when the query contains a limit, the count is restricted by that limit.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |

### Query

    public AggregateQuery Query { get; }

The query producing this snapshot.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.AggregateQuery` |   |

### ReadTime

    public Timestamp ReadTime { get; }

The time at which the snapshot was read.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.Timestamp` |   |

## Methods

### GetHashCode()

    public override int GetHashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

**Overrides** [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

### GetValue\<T\>(AggregateField)

    public T GetValue<T>(AggregateField aggregateField)

Fetches the value from the dictionary, throwing an exception if the value does not exist.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `aggregateField` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.AggregateField` The aggregate field to fetch. Must not be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `T` | The deserialized value. |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `T` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.invalidoperationexception` | The field does not exist in the dictionary. |

### GetValue\<T\>(string)

    public T GetValue<T>(string alias)

Fetches the value from the dictionary, throwing an exception if the value does not exist.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `alias` | `https://learn.microsoft.com/dotnet/api/system.string` The parameter to match the alias of aggregation result to be fetched. Must not be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `T` | The deserialized value. |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `T` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.invalidoperationexception` | The field does not exist in the dictionary. |