using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Shared { public interface ISourceService { // Retrieves a source by its unique identifier (id). // 'id' is the unique identifier of the source. Task GetSourceById(int id); // Retrieves a source by its title. // 'title' is the title of the source to be retrieved. Task GetSourceByTitle(string title); // Retrieves a source by its date. // 'date' is the date associated with the source to be retrieved. Task GetSourceByDate(string date); // Retrieves a source by its type. // 'type' is the type of the source to be retrieved. Task GetSourceByType(string type); // Retrieves all sources, with pagination support. // This returns a list of all sources in the system. Task> GetAll(); // Adds a new source to the system. // 'source' is the source object that will be added. Task AddSource(TSource source); // Updates an existing source identified by its unique identifier ('id'). // 'id' is the unique identifier of the source to be updated // 'source' contains the updated source data. Task UpdateSource(int id, TSource source); // Removes a source from the system based on its unique identifier ('id'). // 'id' is the unique identifier of the source to be removed. Task RemoveSource(int id); // Retrieves the unique identifier of the last added source. Task GetLastSourceId(); } }