Interface IGenreCollection
A collection of IGenres.
Inherited Members
Namespace: StrixMusic.Sdk.AppModels
Assembly: StrixMusic.Sdk.dll
Syntax
public interface IGenreCollection : IGenreCollectionBase, ICollectionBase, IAppModel, IMerged<ICoreGenreCollection>, IEquatable<ICoreGenreCollection>, IMerged
Remarks
Instances of this class may contain data merged from one or more sources.
Methods
| Improve this Doc View SourceAddGenreAsync(IGenre, int, CancellationToken)
Adds a new genre to the collection.
Declaration
Task AddGenreAsync(IGenre genre, int index, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IGenre | 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 IGenreBases starting at the given offset.
Declaration
IAsyncEnumerable<IGenre> 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<IGenre> | The requested range of items. |
Events
| Improve this Doc View SourceGenresChanged
Fires when the genres are changed.
Declaration
event CollectionChangedEventHandler<IGenre>? GenresChanged
Event Type
Type | Description |
---|---|
CollectionChangedEventHandler<IGenre> |