// Copyright (c) Arlo Godfrey. All Rights Reserved. // Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms. // See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information. using System.Collections.ObjectModel; using System.Threading; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Input; using StrixMusic.Sdk.AppModels; namespace StrixMusic.Sdk.ViewModels { /// /// An interfaced ViewModel for . /// This is needed so because multiple view models implement , /// and the UI needs to create controls that handle only the ViewModels properties for an . /// public interface IGenreCollectionViewModel : ISdkViewModel, IGenreCollection { /// /// The genres in this collection. /// public ObservableCollection Genres { get; } /// /// Populates the next set of genres into the collection. /// /// The number of items to load. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. public Task PopulateMoreGenresAsync(int limit, CancellationToken cancellationToken = default); /// /// Loads the entire collection of s and ensures all sources are merged. /// /// A representing the asynchronous operation. public Task InitGenreCollectionAsync(CancellationToken cancellationToken = default); /// /// Initializes the list of the . /// public IAsyncRelayCommand InitGenreCollectionAsyncCommand { get; } /// /// /// public IAsyncRelayCommand PopulateMoreGenresCommand { get; } } }