// 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; namespace StrixMusic.Sdk.BaseModels { /// /// A common interface for all collections that return urls. /// public interface IUrlCollectionBase : ICollectionBase, IAsyncDisposable { /// /// The total number of urls in this collection. /// int TotalUrlCount { get; } /// /// Removes a url from the collection. /// /// the position remove the url from. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. Task RemoveUrlAsync(int index, CancellationToken cancellationToken = default); /// /// Checks if adding a url to the collection at at the given is supported. /// /// A representing the asynchronous operation. If value is true, a new item can be added to the collection. Task IsAddUrlAvailableAsync(int index, CancellationToken cancellationToken = default); /// /// Checks if removing a url to the collection at at the given is supported. /// /// A representing the asynchronous operation. If value is true, the item can be removed from the collection.. Task IsRemoveUrlAvailableAsync(int index, CancellationToken cancellationToken = default); /// /// Fires when the merged number of urls in the collection changes. /// event EventHandler? UrlsCountChanged; } }