Interface IAssetRepository
An interface that provides all the methods to interact with an Unity.Cloud.Assets.IProjectData.
Namespace: Unity.Cloud.Assets
Syntax
public interface IAssetRepository
Methods
CountAssetsAsync(OrganizationId, IEnumerable<ProjectId>, IAssetSearchFilter, AggregationParameters, CancellationToken)
Implement this method to get a list of Unity.Cloud.Assets.Asset for an organization for current user.
Declaration
Task<Aggregation> CountAssetsAsync(OrganizationId organizationId, IEnumerable<ProjectId> projectIds, IAssetSearchFilter assetSearchFilter, AggregationParameters parameters, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
OrganizationId | organizationId | The id of the organization. |
IEnumerable<ProjectId> | projectIds | A list of project ids. |
IAssetSearchFilter | assetSearchFilter | |
AggregationParameters | parameters | The aggregation parameters. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Aggregation> | A task whose result is an aggregation. |
CreateProjectAsync(OrganizationId, IProjectCreation, CancellationToken)
Implement this method to create a new IProject int he specified organization.
Declaration
Task<IProject> CreateProjectAsync(OrganizationId organizationId, IProjectCreation projectCreation, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
OrganizationId | organizationId | The organization to create the project in. |
IProjectCreation | projectCreation | The object containing the necessary information to create a new project. |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IProject> | A task whose result is the new IProject. |
GetProjectAsync(OrganizationId, ProjectId, CancellationToken)
Implement this method to get an IProject for an organization for current user.
Declaration
Task<IProject> GetProjectAsync(OrganizationId organizationId, ProjectId projectId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
OrganizationId | organizationId | The id of the organization. |
ProjectId | projectId | The id of the project. |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IProject> | A task whose result is an IProject. |
ListProjectsAsync(OrganizationId, Pagination, CancellationToken)
Implement this method to get a list of IProject for an organization for current user.
Declaration
IAsyncEnumerable<IProject> ListProjectsAsync(OrganizationId organizationId, Pagination pagination, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
OrganizationId | organizationId | The id of the organization. |
Pagination | pagination | The pagination parameters. |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IProject> | A task whose result is an async enumeration of IProject. |
SearchAssetsAsync(OrganizationId, IEnumerable<ProjectId>, IAssetSearchFilter, Pagination, CancellationToken)
Implement this method to get a list of Unity.Cloud.Assets.Asset for an organization for current user.
Declaration
IAsyncEnumerable<IAsset> SearchAssetsAsync(OrganizationId organizationId, IEnumerable<ProjectId> projectIds, IAssetSearchFilter assetSearchFilter, Pagination pagination, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
OrganizationId | organizationId | The id of the organization. |
IEnumerable<ProjectId> | projectIds | A list of project ids. |
IAssetSearchFilter | assetSearchFilter | |
Pagination | pagination | The pagination parameters. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IAsset> | A task whose result is an async enumeration of Unity.Cloud.Assets.Asset. |