Interface ICoreGenreCollection
A collection of ICoreGenres.
Inherited Members
Namespace: StrixMusic.Sdk.CoreModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface ICoreGenreCollection : ICoreCollection, IGenreCollectionBase, ICollectionBase, ICoreModel
Remarks
This interface should be implemented by a core.
Methods
| Improve this Doc View SourceAddGenreAsync(ICoreGenre, int, CancellationToken)
Adds a new genre to the collection.
Declaration
Task AddGenreAsync(ICoreGenre genre, int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ICoreGenre | genre | The genre to insert. |
int | index | the position to insert the genre 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. |
GetGenresAsync(int, int, CancellationToken)
Gets a requested number of ICoreGenres starting at the given offset in the backend.
Declaration
IAsyncEnumerable<ICoreGenre> GetGenresAsync(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<ICoreGenre> | IAsyncEnumerable<T> containing the requested items. |
Events
| Improve this Doc View SourceGenresChanged
Fires when the genres are changed.
Declaration
event CollectionChangedEventHandler<ICoreGenre>? GenresChanged
Event Type
Type | Description |
---|---|
CollectionChangedEventHandler<ICoreGenre> |