// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable disable using System.Collections.Generic; namespace osu.Game.Database { /// /// Represents a model manager that publishes events when s are added or removed. /// /// The model type. public interface IModelManager where TModel : class { /// /// Delete an item from the manager. /// Is a no-op for already deleted items. /// /// The item to delete. /// false if no operation was performed bool Delete(TModel item); /// /// Delete multiple items. /// This will post notifications tracking progress. /// void Delete(List items, bool silent = false); /// /// Restore multiple items that were previously deleted. /// This will post notifications tracking progress. /// void Undelete(List items, bool silent = false); /// /// Restore an item that was previously deleted. Is a no-op if the item is not in a deleted state, or has its protected flag set. /// /// The item to restore void Undelete(TModel item); /// /// Checks whether a given is already available in the local store. /// /// The whose existence needs to be checked. /// Whether the exists. bool IsAvailableLocally(TModel model); } }