Interface IAlbumCollection
Represents a collection of albums that may contain one or more sources.
Inherited Members
Namespace: StrixMusic.Sdk.AppModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface IAlbumCollection : IAlbumCollectionBase, IPlayableCollectionBase, IAlbumCollectionItem, IAlbumCollectionItemBase, IPlayableCollectionItem, ICollectionItemBase, IMerged<ICoreAlbumCollectionItem>, IEquatable<ICoreAlbumCollectionItem>, IPlayable, IPlayableBase, IDownloadable, IImageCollection, IImageCollectionBase, IMerged<ICoreImageCollection>, IEquatable<ICoreImageCollection>, IUrlCollection, IUrlCollectionBase, ICollectionBase, IMerged<ICoreUrlCollection>, IEquatable<ICoreUrlCollection>, IAppModel, IMerged<ICoreAlbumCollection>, IEquatable<ICoreAlbumCollection>, IMerged
Remarks
Instances of this class may contain data merged from one or more sources.
Methods
| Improve this Doc View SourceAddAlbumItemAsync(IAlbumCollectionItem, int, CancellationToken)
Adds an IAlbum or IAlbumCollection to this album collection.
Declaration
Task AddAlbumItemAsync(IAlbumCollectionItem albumItem, int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IAlbumCollectionItem | albumItem | The album to add. |
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<IAlbumCollectionItem> 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<IAlbumCollectionItem> | The requested range of items. |
PlayAlbumCollectionAsync(IAlbumCollectionItem, CancellationToken)
Attempts to play a specific item in the album collection. Restarts playback if already playing.
Declaration
Task PlayAlbumCollectionAsync(IAlbumCollectionItem albumItem, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IAlbumCollectionItem | albumItem | An item from the collection where playback begins. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
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<IAlbumCollectionItem>? AlbumItemsChanged
Event Type
Type | Description |
---|---|
CollectionChangedEventHandler<IAlbumCollectionItem> |