docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GroupAndCountAssetsQueryBuilder

    A class that builds and executes a query to return an asset count.

    Inheritance
    object
    GroupAndCountAssetsQueryBuilder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Assets
    Assembly: Unity.Cloud.Assets.dll
    Syntax
    public class GroupAndCountAssetsQueryBuilder

    Methods

    ExecuteAsync(IEnumerable<Groupable>, CancellationToken)

    Executes the query and returns the result.

    Declaration
    public IAsyncEnumerable<KeyValuePair<IEnumerable<GroupableFieldValue>, int>> ExecuteAsync(IEnumerable<Groupable> groupBy, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IEnumerable<Groupable> groupBy

    A combination of GroupableField and metadata field keys by which to group the assets.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    IAsyncEnumerable<KeyValuePair<IEnumerable<GroupableFieldValue>, int>>

    An async enumeration of GroupableFieldValue and its corresponding asset count.

    ExecuteAsync(Groupable, CancellationToken)

    Executes the query and returns the result.

    Declaration
    public IAsyncEnumerable<KeyValuePair<GroupableFieldValue, int>> ExecuteAsync(Groupable groupBy, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Groupable groupBy

    A GroupableField by which to group the assets.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    IAsyncEnumerable<KeyValuePair<GroupableFieldValue, int>>

    An async enumeration of GroupableFieldValue and its corresponding asset count.

    ExecuteAsync(GroupableField, CancellationToken)

    Executes the query and returns the result.

    Declaration
    [Obsolete("Use ExecuteAsync((Groupable)groupBy, cancellationToken) instead.")]
    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
    [Obsolete("Use ExecuteAsync(GroupableField.Collections, cancellationToken) instead.")]
    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)