Interface IAssetCollection
This object contains the information pertaining to an asset collection.
Namespace: Unity.Cloud.Assets
Syntax
public interface IAssetCollection
Properties
CatalogId
The id of an associated catalog.
Declaration
string CatalogId { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
Description
Describes the collection.
Declaration
string Description { get; }
Property Value
| Type | Description |
|---|---|
| String |
Metadata
Additional serialized information about the collection.
Declaration
IDeserializable Metadata { get; set; }
Property Value
| Type | Description |
|---|---|
| IDeserializable |
Name
The name of the collection.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
ParentPath
The path to the parent collection; can be empty.
Declaration
CollectionPath ParentPath { get; }
Property Value
| Type | Description |
|---|---|
| CollectionPath |
Methods
AddAssetsAsync(IEnumerable<IAsset>, CancellationToken)
Adds a set of asset references to the collection.
Declaration
Task AddAssetsAsync(IEnumerable<IAsset> assets, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IAsset> | assets | The assets to link to the collection. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
GetFullCollectionPath()
Returns the full path to the collection.
Declaration
string GetFullCollectionPath()
Returns
| Type | Description |
|---|---|
| String | The path of the collection. |
MoveToNewPathAsync(CollectionPath, CancellationToken)
Reparents the collection to a new path.
Declaration
Task MoveToNewPathAsync(CollectionPath newCollectionPath, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CollectionPath | newCollectionPath | The new parent path. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
RemoveAssetsAsync(IEnumerable<IAsset>, CancellationToken)
Removes a set of asset references from the collection.
Declaration
Task RemoveAssetsAsync(IEnumerable<IAsset> assets, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IAsset> | assets | The assets to unlink from the collection. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
SetDescription(String)
Sets the Description of the collection.
Declaration
void SetDescription(string description)
Parameters
| Type | Name | Description |
|---|---|---|
| String | description | The description of the collection. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | This exception is thrown if the |
SetName(String)
Sets the Name of the collection.
Declaration
void SetName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name of the collection. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | This exception is thrown if the |
UpdateAsync(CancellationToken)
Synchronizes the local changes to the collection with the data source.
Declaration
Task UpdateAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |