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 lobbies /// /!\ all methods returns a task /// /// a DTO, Entity or Model lobby public interface ILobbyManager { /// /// get the number of T element /// /// the number of T element public int getNbElements(); /// /// add a lobby /// /// the lobby to add /// the lobby added public Task addLobby(T lobby); /// /// delete a T element /// /// the lobby to remove /// /// the T element deleted or /// null if there isn't any /// public Task removeLobby(T lobby); /// /// delete a T element with an id /// /// the id of the T element /// /// the T element deleted that corresponde /// to the id or null if there isn't any /// public Task removeLobby(uint id); /// /// get a part of all lobbies /// /// 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))) /// public Task<(int nbPages, IEnumerable? lobbies)> getLobbies(int nb, int count, LobbyOrderCriteria orderCriteria = LobbyOrderCriteria.ById); /// /// get a T element with an id /// /// the id of the T element /// /// the T element that corresponde /// to the id or null if there isn't any /// public Task getLobby(uint id); } }