Class GroupAndCountAssetsQueryBuilder
A class that builds and executes a query to return an asset count.
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public class GroupAndCountAssetsQueryBuilder
Methods
ExecuteAsync(GroupableField, CancellationToken)
Executes the query and returns the result.
Declaration
public Task<IReadOnlyDictionary<string, int>> ExecuteAsync(GroupableField groupBy, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupableField | groupBy | The field by which to group the assets. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyDictionary<string, int>> | A task whose result is a dictionary of groups and their counts. |
GroupByCollectionAndExecuteAsync(CancellationToken)
Executes the query and returns the result.
Declaration
public Task<IReadOnlyDictionary<CollectionDescriptor, int>> GroupByCollectionAndExecuteAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyDictionary<CollectionDescriptor, int>> | A task whose result is a dictionary of . |
LimitTo(int)
Sets the limit of the counters.
Declaration
public GroupAndCountAssetsQueryBuilder LimitTo(int limit)
Parameters
| Type | Name | Description |
|---|---|---|
| int | limit | The max count to return for each value. |
Returns
| Type | Description |
|---|---|
| GroupAndCountAssetsQueryBuilder | The calling GroupAndCountAssetsQueryBuilder. |
SelectWhereMatchesFilter(IAssetSearchFilter)
Sets the filter to be used when querying assets.
Declaration
public GroupAndCountAssetsQueryBuilder SelectWhereMatchesFilter(IAssetSearchFilter assetSearchFilter)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetSearchFilter | assetSearchFilter | The query filter. |
Returns
| Type | Description |
|---|---|
| GroupAndCountAssetsQueryBuilder | The calling GroupAndCountAssetsQueryBuilder. |