using System.Diagnostics.CodeAnalysis; using OliverBooth.Common.Data.Web; namespace OliverBooth.Common.Services; /// /// Represents a service for interacting with projects. /// public interface IProjectService { /// /// Gets the description of the specified project. /// /// The project whose description to get. /// The description of the specified project. /// is . string GetDescription(IProject project); /// /// Gets all projects. /// /// A read-only list of projects. IReadOnlyList GetAllProjects(); /// /// Gets the programming languages used in the specified project. /// /// The project whose languages to return. /// A read only view of the languages. IReadOnlyList GetProgrammingLanguages(IProject project); /// /// Gets all projects with the specified status. /// /// The status of the projects to get. /// A read-only list of projects with the specified status. IReadOnlyList GetProjects(ProjectStatus status = ProjectStatus.Ongoing); /// /// Attempts to find a project with the specified ID. /// /// The ID of the project. /// /// When this method returns, contains the project associated with the specified ID, if the project is found; /// otherwise, . /// /// /// if a project with the specified ID is found; otherwise, . /// bool TryGetProject(Guid id, [NotNullWhen(true)] out IProject? project); /// /// Attempts to find a project with the specified slug. /// /// The slug of the project. /// /// When this method returns, contains the project associated with the specified slug, if the project is found; /// otherwise, . /// /// /// if a project with the specified slug is found; otherwise, . /// bool TryGetProject(string slug, [NotNullWhen(true)] out IProject? project); }