using OrderCriterias; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ManagerInterfaces { /// /// All methods to handle chapters /// /!\ all methods returns a task /// /// a DTO, Entity or Model chapter public interface IChapterManager { /// /// get the number of T element /// /// the number of T element public int getNbElements(); /// /// add a chapter /// /// chapter to add /// /// the chapter added or the chapter that correspond /// to it and that is already in the database /// Task addChapter(T chapter); /// /// remove a chapter /// /// the chapter to remove /// /// the chapter removed or null if /// the chapter does not exist /// Task removeChapter(T chapter); /// /// remove a chapter /// /// the identifier of the chapter to remove /// /// the chapter removed or null if /// the chapter does not exist /// Task removeChapter(uint id); /// /// get a chapter /// /// the identifier of the chapter to remove /// /// the chapter that correspond /// to the id or null if the /// chapter does not exist /// Task getChapter(uint id); /// /// get a part of all chapters /// /// the actual page /// number of T element in a page /// the order criteria /// /// a set of the number of page and /// all T element in the database for /// the page nb (or null if the page /// does not exist (<=> (nb-1)*count outside /// boundaries (0, getNbElement()-1))) /// Task<(int nbPages, IEnumerable? chapters)> getChapters(int nb, int count, ChapterOrderCriteria orderCriteria = ChapterOrderCriteria.ById); } }