// 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; using System.Threading; using System.Threading.Tasks; using StrixMusic.Sdk.AppModels; using StrixMusic.Sdk.CoreModels; namespace StrixMusic.Sdk.BaseModels { /// /// A common class for a collection of images. /// /// /// public interface IImageCollectionBase : ICollectionBase, IAsyncDisposable { /// /// Checks if adding a to the collection at at the given is supported. /// /// A representing the asynchronous operation. If value is true, a new can be added. Task IsAddImageAvailableAsync(int index, CancellationToken cancellationToken = default); /// /// Checks if removing a to the collection at at the given is supported. /// /// A representing the asynchronous operation. If value is true, the can be removed. Task IsRemoveImageAvailableAsync(int index, CancellationToken cancellationToken = default); /// /// Removes the image from the collection on the backend. /// /// The index of the image to remove. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. Task RemoveImageAsync(int index, CancellationToken cancellationToken = default); /// /// The total number of images in the collection. /// int TotalImageCount { get; } /// /// Fires when the merged number of images in the collection changes. /// event EventHandler? ImagesCountChanged; } }