using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Shared { public interface IQuestionService { // Retrieves all questions, with pagination support. // This returns a list of all questions in the system. Task> GetAllQuestion(); // Retrieves a subset of questions based on the provided index and page size. // 'index' is the starting point for pagination (page number). // 'pageSize' is the number of questions per page. Task> GetSomeQuestion(int index, int pageSize); // Retrieves questions that are marked as invalid, with pagination support. // 'index' is the starting page (page number) // 'pageSize' is the number of questions per page. Task> GetInvalidQuestion(int index, int pageSize); // Retrieves a specific question by its unique identifier (id). // 'id' is the unique identifier of the question. Task GetQuestionById(int id); // Retrieves a random question from the system. Task GetRandomQuestion(); // Adds a new question to the system. // 'question' is the question object that will be added. Task AddQuestion(TQuestion question); // Updates an existing question identified by 'id'. // 'id' is the unique identifier of the question // 'question' contains the new question data. Task UpdateQuestion(int id, TQuestion question); // Removes a question from the system based on its unique identifier ('id'). // 'id' is the unique identifier of the question to be removed. Task RemoveQuestion(int id); // Retrieves the total count of questions in the system. Task CountQuestions(); // Validates or invalidates a question based on its unique identifier ('id'). // 'id' is the unique identifier of the question // 'isvalid' is a boolean indicating whether the question is valid. Task ValidateQuestion(int id, bool isvalid); // Retrieves a random question from a quote to a character. Task GetRandomQuestionQuoteToCharacter(); // Retrieves a random question from a quote to a source. Task GetRandomQuestionQuoteToSource(); } }