using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Shared { public interface ICharacterService { // Retrieves a character by its unique identifier (id). // 'id' is the unique identifier of the character. Task GetCharById(int id); // Retrieves a character by its name. // 'name' is the name of the character to be retrieved. Task GetCharByName(string name); // Retrieves all characters, with pagination support. // This returns a list of all characters in the system. Task> GetAll(); // Adds a new character to the system. // 'character' is the character object that will be added to the system. Task AddCharacter(TChar character); // Updates an existing character identified by its unique identifier ('id'). // 'id' is the unique identifier of the character to be updated // 'character' contains the updated character data. Task UpdateCharacter(int id, TChar character); // Removes a character from the system based on its unique identifier ('id'). // 'id' is the unique identifier of the character to be removed. Task RemoveCharacter(int id); // Retrieves the unique identifier of the last added character. Task GetLastCharId(); } }