Interface ICoreAlbumCollection
A collection of ICoreAlbumCollectionItems and the properties and methods for using and manipulating them.
Inherited Members
Namespace: StrixMusic.Sdk.CoreModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface ICoreAlbumCollection : ICorePlayableCollection, IAlbumCollectionBase, IPlayableCollectionBase, ICoreAlbumCollectionItem, IAlbumCollectionItemBase, IPlayableCollectionItem, IPlayableBase, ICollectionItemBase, ICoreImageCollection, IImageCollectionBase, ICoreUrlCollection, ICoreCollection, IUrlCollectionBase, ICollectionBase, ICoreModel
Remarks
This interface should be implemented in a core.
Methods
| Improve this Doc View SourceAddAlbumItemAsync(ICoreAlbumCollectionItem, int, CancellationToken)
Adds a new album to the collection on the backend.
Declaration
Task AddAlbumItemAsync(ICoreAlbumCollectionItem album, int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ICoreAlbumCollectionItem | album | The album to create. |
int | index | the position to insert the album at. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
GetAlbumItemsAsync(int, int, CancellationToken)
Gets a requested number of IAlbumCollectionItemBases starting at the given offset in the backend.
Declaration
IAsyncEnumerable<ICoreAlbumCollectionItem> GetAlbumItemsAsync(int limit, int offset, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | limit | The max number of items to return. |
int | offset | Get items starting at this index. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<ICoreAlbumCollectionItem> | IAsyncEnumerable<T> that returns the items as they're retrieved. |
PlayAlbumCollectionAsync(ICoreAlbumCollectionItem, CancellationToken)
Attempts to play a specific item in the album collection. Restarts playback if already playing.
Declaration
Task PlayAlbumCollectionAsync(ICoreAlbumCollectionItem albumItem, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ICoreAlbumCollectionItem | albumItem | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
Events
| Improve this Doc View SourceAlbumItemsChanged
Fires when the items in the backend are changed by something external.
Declaration
event CollectionChangedEventHandler<ICoreAlbumCollectionItem>? AlbumItemsChanged
Event Type
Type | Description |
---|---|
CollectionChangedEventHandler<ICoreAlbumCollectionItem> |