Class LibraryExtensions
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public static class LibraryExtensions
Methods
CountAssetsAsync(IAssetLibrary, IAssetSearchFilter, CancellationToken)
Returns the total count of assets in the specified library based on the provided criteria.
Declaration
public static Task<int> CountAssetsAsync(this IAssetLibrary assetLibrary, IAssetSearchFilter assetSearchFilter, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAssetLibrary | assetLibrary | The IAssetLibrary. |
IAssetSearchFilter | assetSearchFilter | The filter specifying the search criteria. Can be null. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<int> | A task whose result is an asset count. |
ListCollectionsAsync(IAssetLibrary, Range, CancellationToken)
Returns the collections of the library.
Declaration
public static IAsyncEnumerable<IAssetCollection> ListCollectionsAsync(this IAssetLibrary assetLibrary, Range range, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAssetLibrary | assetLibrary | The IAssetLibrary. |
Range | range | The range of results to return. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IAssetCollection> | A task whose result is an async enumeration of IAssetCollection. |
ListFieldDefinitionsAsync(IAssetLibrary, IEnumerable<string>, CancellationToken)
Returns the field definitions of the library.
Declaration
public static IAsyncEnumerable<IFieldDefinition> ListFieldDefinitionsAsync(this IAssetLibrary assetLibrary, IEnumerable<string> fieldDefinitionKeys, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAssetLibrary | assetLibrary | The IAssetLibrary. |
IEnumerable<string> | fieldDefinitionKeys | The keys of the field definitions to query. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IFieldDefinition> | An async enumeration of IFieldDefinition. |
ListLabelsAsync(IAssetLibrary, Range, CancellationToken)
Returns the labels of the library.
Declaration
public static IAsyncEnumerable<ILabel> ListLabelsAsync(this IAssetLibrary assetLibrary, Range range, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAssetLibrary | assetLibrary | The IAssetLibrary. |
Range | range | The range of results to return. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<ILabel> | An async enumeration of ILabel. |