Class VersionQueryBuilder
A class that builds and executes a query to return a the versions of an asset.
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public sealed class VersionQueryBuilder
Methods
ExecuteAsync(CancellationToken)
Executes the query and returns the versions of the asset that satisfy the critiera.
Declaration
public IAsyncEnumerable<IAsset> ExecuteAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IAsset> | An async enumeration of IAsset with the same Unity.Cloud.Common.AssetId. |
LimitTo(Range)
Sets the range of results to return.
Declaration
public VersionQueryBuilder LimitTo(Range range)
Parameters
Type | Name | Description |
---|---|---|
Range | range | The range of results. |
Returns
Type | Description |
---|---|
VersionQueryBuilder | The calling VersionQueryBuilder. |
OrderBy(string, SortingOrder)
Sets the order in which the results will be returned.
Declaration
public VersionQueryBuilder OrderBy(string sortingField, SortingOrder sortingOrder = SortingOrder.Ascending)
Parameters
Type | Name | Description |
---|---|---|
string | sortingField | The field by which to sort the results. |
SortingOrder | sortingOrder | The sorting order (Ascending|Descending). |
Returns
Type | Description |
---|---|
VersionQueryBuilder | The calling VersionQueryBuilder. |
SelectWhereMatchesFilter(IAssetSearchFilter)
Sets the filter to be used when querying the versions of the asset.
Declaration
public VersionQueryBuilder SelectWhereMatchesFilter(IAssetSearchFilter assetSearchFilter)
Parameters
Type | Name | Description |
---|---|---|
IAssetSearchFilter | assetSearchFilter | The query filter. |
Returns
Type | Description |
---|---|
VersionQueryBuilder | The calling VersionQueryBuilder. |
WithCacheConfiguration(AssetCacheConfiguration)
Sets an override to the default cache configuration for assets.
Declaration
public VersionQueryBuilder WithCacheConfiguration(AssetCacheConfiguration assetCacheConfiguration)
Parameters
Type | Name | Description |
---|---|---|
AssetCacheConfiguration | assetCacheConfiguration | The configuration to apply when populating the assets. |
Returns
Type | Description |
---|---|
VersionQueryBuilder | The calling VersionQueryBuilder. |