Class AssetRepositoryExtensions
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public static class AssetRepositoryExtensions
Methods
CountAssetsAsync(IAssetRepository, IEnumerable<ProjectDescriptor>, IAssetSearchFilter, CancellationToken)
Returns the total count of assets in the specified projects based on the provided criteria.
Declaration
public static Task<int> CountAssetsAsync(this IAssetRepository assetRepository, IEnumerable<ProjectDescriptor> projectDescriptors, IAssetSearchFilter assetSearchFilter, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetRepository | assetRepository | The IAssetRepository. |
| IEnumerable<ProjectDescriptor> | projectDescriptors | The ids of the projects. |
| 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. |
CountAssetsAsync(IAssetRepository, OrganizationId, IAssetSearchFilter, CancellationToken)
Returns the total count of assets in the specified projects based on the provided criteria.
Declaration
public static Task<int> CountAssetsAsync(this IAssetRepository assetRepository, OrganizationId organizationId, IAssetSearchFilter assetSearchFilter, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetRepository | assetRepository | The IAssetRepository. |
| OrganizationId | organizationId | The id of the organization. |
| 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. |
GetDefaultStatusFlowAsync(IAssetRepository, OrganizationId, CancellationToken)
Returns the default status flow for the specified organization.
Declaration
public static Task<IStatusFlow> GetDefaultStatusFlowAsync(this IAssetRepository assetRepository, OrganizationId organizationId, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetRepository | assetRepository | The IAssetRepository. |
| OrganizationId | organizationId | The id of the organization. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task<IStatusFlow> | An IStatusFlow. |
ListAssetProjectsAsync(IAssetRepository, OrganizationId, Range, CancellationToken)
Lists an organization's IAssetProject.
Declaration
public static IAsyncEnumerable<IAssetProject> ListAssetProjectsAsync(this IAssetRepository assetRepository, OrganizationId organizationId, Range range, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetRepository | assetRepository | The IAssetRepository. |
| OrganizationId | organizationId | The id of the organization. |
| Range | range | The range of results to return. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| IAsyncEnumerable<IAssetProject> | An async enumeration of IAssetProject. |
ListFieldDefinitionsAsync(IAssetRepository, OrganizationId, Range, CancellationToken)
Lists an organization's IFieldDefinition.
Declaration
public static IAsyncEnumerable<IFieldDefinition> ListFieldDefinitionsAsync(this IAssetRepository assetRepository, OrganizationId organizationId, Range range, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetRepository | assetRepository | The IAssetRepository. |
| OrganizationId | organizationId | The id of the organization. |
| Range | range | The range of results to return. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| IAsyncEnumerable<IFieldDefinition> | An async enumeration of IFieldDefinition. |
ListLabelsAsync(IAssetRepository, OrganizationId, Range, CancellationToken)
Lists an organization's ILabel.
Declaration
public static IAsyncEnumerable<ILabel> ListLabelsAsync(this IAssetRepository assetRepository, OrganizationId organizationId, Range range, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetRepository | assetRepository | The IAssetRepository. |
| OrganizationId | organizationId | The id of the organization. |
| 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. |
ListStatusFlowsAsync(IAssetRepository, OrganizationId, Range, CancellationToken)
Lists an organization's IStatusFlow.
Declaration
public static IAsyncEnumerable<IStatusFlow> ListStatusFlowsAsync(this IAssetRepository assetRepository, OrganizationId organizationId, Range range, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetRepository | assetRepository | The IAssetRepository. |
| OrganizationId | organizationId | The id of the organization. |
| Range | range | The range of results to return. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| IAsyncEnumerable<IStatusFlow> | An async enumeration of IStatusFlow. |