using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Shared { public interface IQuizService { // Retrieves a specific quiz by its unique identifier (id). // 'id' is the unique identifier of the quiz to be retrieved. Task GetQuizById(int id); // Retrieves all quizzes, with pagination support. // This returns a list of all quizzes in the system. Task> GetAllQuiz(); // Retrieves a subset of quizzes based on the provided index and page size. // 'index' is the starting point for pagination (page number). // 'pageSize' is the number of quizzes per page. Task> GetSomeQuiz(int index, int pageSize); // Adds a new quiz to the system. // 'quiz' is the quiz object that will be added to the system. Task AddQuiz(TQuiz quiz); // Updates an existing quiz identified by its unique identifier ('quizId'). // 'quizId' is the unique identifier of the quiz to be updated // 'quiz' contains the updated quiz data. Task UpdateQiz(int quizId, TQuiz quiz); // Removes a quiz from the system based on its unique identifier ('quizId'). // 'quizId' is the unique identifier of the quiz to be removed from the system. Task RemoveQuiz(int quizId); // Retrieves the number of questions in a specific quiz identified by its unique identifier ('quizId'). // 'quizId' is the unique identifier of the quiz for which the number of questions is requested. Task GetNbQuestionQuiz(int quizId); } }