Enforces XML documentation on public members.

This commit is contained in:
BinaryAlley committed 2026-11-16 20:16:23 +02:00
1 parent 0daef2acab
commit 308402ad0e
202 files changed
+3901 -98

No files matched your search

@@ -142,9 +142,9 @@ public class BookEntity : IStorageEntity, IAuditableEntity
/// </summary>
public float? VolumeNumber { get; set; }
// TODO: uncomment when series is implemented.
/// <summary>
/// Gets or sets the series id, if the book is part of a series.
/// </summary>
///// <summary>
///// Gets or sets the series id, if the book is part of a series.
///// </summary>
//public Guid? BookSeriesId { get; set; }
/// <summary>
@@ -183,7 +183,7 @@ public class BookEntity : IStorageEntity, IAuditableEntity
public string? GoogleBooksId { get; set; }
/// <summary>
/// Gets or sets the Barnes & Noble ID of the book.
/// Gets or sets the Barnes &amp; Noble ID of the book.
/// </summary>
public string? BarnesAndNobleId { get; set; }
@@ -23,6 +23,7 @@ public interface ILibraryScanRepository : IRepository<LibraryScanEntity>,
/// <summary>
/// Gets the media library scans that belong to a media library identified by <paramref name="libraryId"/>, for the previous month, from the storage medium.
/// </summary>
/// <param name="libraryId">The unique identifier of the media library whose scans are retrieved.</param>
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
/// <returns>An <see cref="Result{TValue}"/> containing either a collection of <see cref="LibraryScanEntity"/>, or an error.</returns>
Task<Result<IEnumerable<LibraryScanEntity>>> GetPastMonthScansByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken);
@@ -9,25 +9,99 @@ namespace Lumina.Application.Common.Errors;
/// </summary>
public static partial class Errors
{
/// <summary>
/// Error types for application authentication operations.
/// </summary>
public static class Authentication
{
/// <summary>
/// Gets the error that reports that a username already exists.
/// </summary>
public static Error UsernameAlreadyExists => Error.Conflict(description: nameof(UsernameAlreadyExists));
/// <summary>
/// Gets the error that reports that a username does not exist.
/// </summary>
public static Error UsernameDoesNotExist => Error.NotFound(description: nameof(UsernameDoesNotExist));
/// <summary>
/// Gets the error that reports that a username cannot be empty.
/// </summary>
public static Error UsernameCannotBeEmpty => Error.Validation(description: nameof(UsernameCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a time-based one-time password cannot be empty.
/// </summary>
public static Error TotpCannotBeEmpty => Error.Validation(description: nameof(TotpCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a password cannot be empty.
/// </summary>
public static Error PasswordCannotBeEmpty => Error.Validation(description: nameof(PasswordCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a new password cannot be empty.
/// </summary>
public static Error NewPasswordCannotBeEmpty => Error.Validation(description: nameof(NewPasswordCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a current password cannot be empty.
/// </summary>
public static Error CurrentPasswordCannotBeEmpty => Error.Validation(description: nameof(CurrentPasswordCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a password confirmation cannot be empty.
/// </summary>
public static Error PasswordConfirmCannotBeEmpty => Error.Validation(description: nameof(PasswordConfirmCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a new password confirmation cannot be empty.
/// </summary>
public static Error NewPasswordConfirmCannotBeEmpty => Error.Validation(description: nameof(NewPasswordConfirmCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a password is invalid.
/// </summary>
public static Error InvalidPassword => Error.Validation(description: nameof(InvalidPassword));
/// <summary>
/// Gets the error that reports that a username must be between 3 and 255 characters long.
/// </summary>
public static Error UsernameMustBeBetween3And255CharactersLong => Error.Validation(description: nameof(UsernameMustBeBetween3And255CharactersLong));
/// <summary>
/// Gets the error that reports that a username is invalid.
/// </summary>
public static Error InvalidUsername => Error.Validation(description: nameof(InvalidUsername));
/// <summary>
/// Gets the error that reports that a password and its confirmation do not match.
/// </summary>
public static Error PasswordsNotMatch => Error.Validation(description: nameof(PasswordsNotMatch));
/// <summary>
/// Gets the error that reports that a time-based one-time password code is invalid.
/// </summary>
public static Error InvalidTotpCode => Error.Validation(description: nameof(InvalidTotpCode));
/// <summary>
/// Gets the error that reports that the combination of a username and a password is invalid.
/// </summary>
public static Error InvalidUsernameOrPassword => Error.Failure(description: nameof(InvalidUsernameOrPassword));
/// <summary>
/// Gets the error that reports that a current password is invalid.
/// </summary>
public static Error InvalidCurrentPassword => Error.Failure(description: nameof(InvalidCurrentPassword));
/// <summary>
/// Gets the error that reports that a temporary password has expired.
/// </summary>
public static Error TempPasswordExpired => Error.Failure(description: nameof(TempPasswordExpired));
/// <summary>
/// Gets the error that reports that a password reset has already been requested.
/// </summary>
public static Error PasswordResetAlreadyRequested => Error.Failure(description: nameof(PasswordResetAlreadyRequested));
}
}
@@ -9,24 +9,94 @@ namespace Lumina.Application.Common.Errors;
/// </summary>
public static partial class Errors
{
/// <summary>
/// Error types for application authorization operations.
/// </summary>
public static class Authorization
{
/// <summary>
/// Gets the error that reports that the caller is not authorized to perform the operation.
/// </summary>
public static Error NotAuthorized => Error.Unauthorized(description: nameof(NotAuthorized));
/// <summary>
/// Gets the error that reports that the administrator account has already been created.
/// </summary>
public static Error AdminAccountAlreadyCreated => Error.Conflict(description: nameof(AdminAccountAlreadyCreated));
/// <summary>
/// Gets the error that reports that the administrator account does not exist.
/// </summary>
public static Error AdminAccountNotFound => Error.NotFound(description: nameof(AdminAccountNotFound));
/// <summary>
/// Gets the error that reports that the administrator role does not exist.
/// </summary>
public static Error AdminRoleNotFound => Error.NotFound(description: nameof(AdminRoleNotFound));
/// <summary>
/// Gets the error that reports that the administrator role cannot be deleted.
/// </summary>
public static Error AdminRoleCannotBeDeleted => Error.Forbidden(description: nameof(AdminRoleCannotBeDeleted));
/// <summary>
/// Gets the error that reports that a role does not exist.
/// </summary>
public static Error RoleNotFound => Error.NotFound(description: nameof(RoleNotFound));
/// <summary>
/// Gets the error that reports that a permission does not exist.
/// </summary>
public static Error PermissionNotFound => Error.NotFound(description: nameof(PermissionNotFound));
/// <summary>
/// Gets the error that reports that a permission already exists.
/// </summary>
public static Error PermissionAlreadyExists => Error.Conflict(description: nameof(PermissionAlreadyExists));
/// <summary>
/// Gets the error that reports that a role already exists.
/// </summary>
public static Error RoleAlreadyExists => Error.Conflict(description: nameof(RoleAlreadyExists));
/// <summary>
/// Gets the error that reports that a role identifier cannot be empty.
/// </summary>
public static Error RoleIdCannotBeEmpty => Error.Validation(description: nameof(RoleIdCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a permissions list cannot be <see langword="null"/>.
/// </summary>
public static Error PermissionsListCannotBeNull => Error.Validation(description: nameof(PermissionsListCannotBeNull));
/// <summary>
/// Gets the error that reports that a permissions list cannot be empty.
/// </summary>
public static Error PermissionsListCannotBeEmpty => Error.Validation(description: nameof(PermissionsListCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a permission identifier cannot be empty.
/// </summary>
public static Error PermissionIdCannotBeEmpty => Error.Validation(description: nameof(PermissionIdCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a role name cannot be empty.
/// </summary>
public static Error RoleNameCannotBeEmpty => Error.Validation(description: nameof(RoleNameCannotBeEmpty));
/// <summary>
/// Gets the error that reports that a role name cannot be <see langword="null"/>.
/// </summary>
public static Error RoleNameCannotBeNull => Error.Validation(description: nameof(RoleNameCannotBeNull));
/// <summary>
/// Gets the error that reports that the last administrator account cannot be removed.
/// </summary>
public static Error CannotRemoveLastAdmin => Error.Forbidden(description: nameof(CannotRemoveLastAdmin));
/// <summary>
/// Gets the error that reports that a user must have a role or direct permissions.
/// </summary>
public static Error UserMustHaveRoleOrDirectPermissions => Error.Forbidden(description: nameof(UserMustHaveRoleOrDirectPermissions));
}
}
@@ -9,11 +9,29 @@ namespace Lumina.Application.Common.Errors;
/// </summary>
public static partial class Errors
{
/// <summary>
/// Error types for application persistence operations.
/// </summary>
public static class Persistence
{
/// <summary>
/// Gets the error that reports that a media library could not be persisted.
/// </summary>
public static Error ErrorPersistingMediaLibrary => Error.Failure(description: nameof(ErrorPersistingMediaLibrary));
/// <summary>
/// Gets the error that reports that an authorization role could not be persisted.
/// </summary>
public static Error ErrorPersistingAuthorizationRole => Error.Failure(description: nameof(ErrorPersistingAuthorizationRole));
/// <summary>
/// Gets the error that reports that a unique constraint was violated.
/// </summary>
public static Error UniqueConstraintViolation => Error.Conflict(description: nameof(UniqueConstraintViolation));
/// <summary>
/// Gets the error that reports that a concurrency conflict occurred while persisting changes.
/// </summary>
public static Error ConcurrencyConflict => Error.Conflict(description: nameof(ConcurrencyConflict));
}
}
@@ -10,6 +10,9 @@ namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration;
[DebuggerDisplay("{SECTION_NAME}")]
public class MediaSettingsDto
{
/// <summary>
/// The name of the configuration section that holds the media settings.
/// </summary>
public const string SECTION_NAME = "MediaSettings";
/// <summary>
@@ -10,6 +10,9 @@ namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration;
[DebuggerDisplay("{SECTION_NAME}")]
public class PluginsSettingsDto
{
/// <summary>
/// The name of the configuration section that holds the plugins settings.
/// </summary>
public const string SECTION_NAME = "PluginsSettings";
/// <summary>
@@ -54,7 +54,7 @@ public static class FileSystemItemMapping
}
/// <summary>
/// Converts <paramref name="domainEntities"/> to <see cref="IEnumerable<FileSystemTreeNodeResponse>"/>.
/// Converts <paramref name="domainEntities"/> to a collection of <see cref="FileSystemTreeNodeResponse"/>.
/// </summary>
/// <param name="domainEntities">The domain entities to be converted.</param>
/// <returns>The converted entities.</returns>
@@ -11,7 +11,7 @@ namespace Lumina.Application.Common.Mapping.FileSystemManagement.Files;
public static class GetTreeFilesRequestMapping
{
/// <summary>
/// Converts <paramref name="request"/> to <see cref="GetTreeDirectoriesQuery"/>.
/// Converts <paramref name="request"/> to <see cref="GetTreeFilesQuery"/>.
/// </summary>
/// <param name="request">The request to be converted.</param>
/// <returns>The converted query.</returns>
@@ -346,7 +346,7 @@ public static class ValidatorUtilities
/// </summary>
/// <remarks>
/// If the property is <see langword="null"/> or not a string, this rule fails (use
/// <see cref="When{TRequest, TProperty}(IRuleBuilder{TRequest, TProperty}, Func{TRequest, bool})"/> to skip optional properties).
/// <c>When</c> to skip optional properties).
/// </remarks>
/// <typeparam name="TRequest">The type of the request being validated.</typeparam>
/// <typeparam name="TProperty">The type of the property being validated.</typeparam>
@@ -165,7 +165,7 @@ public class GetResumePointQueryHandler : IQueryHandler<GetResumePointQuery, Res
/// Commits the deletion of a stale or orphan resume point, so that the cleanup survives the not-found response of this query.
/// </summary>
/// <remarks>
/// The request transaction is committed by <see cref="EventualConsistencyMiddleware"/> only when the response is a success, and this query intentionally
/// The request transaction is committed by the <c>EventualConsistencyMiddleware</c> only when the response is a success, and this query intentionally
/// responds with a not-found error after it cleans up, so the deletion is committed here. A failed save has nothing to persist, and a concurrency
/// conflict means that the row is already gone, which is the desired outcome. Committing when no transaction is open is a no-op, which keeps the handler usable outside of the HTTP pipeline.
/// </remarks>
@@ -4,7 +4,7 @@ namespace Lumina.Application.Core.MediaLibrary.AudioLibrary.MusicLibrary.Playbac
/// Defines the format of the opaque delivery handle of a playback manifest.
/// </summary>
/// <remarks>
/// A handle is a <see cref="Guid"/> rendered with the <c>N</c> format: exactly 32 lowercase hexadecimal characters, with no separator. Every producer
/// A handle is a <see cref="System.Guid"/> rendered with the <c>N</c> format: exactly 32 lowercase hexadecimal characters, with no separator. Every producer
/// and consumer of a handle uses this rule, so a handle is never silently normalized into another value.
/// </remarks>
public static class PlaybackDeliveryId
@@ -28,7 +28,7 @@ namespace Lumina.Application.Core.MediaLibrary.WrittenContentLibrary.BookLibrary
/// <param name="OpenLibraryId">The Open Library ID of the book, if applicable.</param>
/// <param name="LibraryThingId">The LibraryThing ID of the book, if applicable.</param>
/// <param name="GoogleBooksId">The Google Books ID of the book, if applicable.</param>
/// <param name="BarnesAndNobleId">The Barnes & Noble ID of the book, if applicable.</param>
/// <param name="BarnesAndNobleId">The Barnes &amp; Noble ID of the book, if applicable.</param>
/// <param name="AppleBooksId">The Apple Books ID of the book, if applicable.</param>
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book.</param>
/// <param name="Contributors">The list of media contributors that contributed to this book.</param>
@@ -28,7 +28,7 @@ namespace Lumina.Application.Core.MediaLibrary.WrittenContentLibrary.BookLibrary
/// <param name="OpenLibraryId">The Open Library ID of the book, if applicable.</param>
/// <param name="LibraryThingId">The LibraryThing ID of the book, if applicable.</param>
/// <param name="GoogleBooksId">The Google Books ID of the book, if applicable.</param>
/// <param name="BarnesAndNobleId">The Barnes & Noble ID of the book, if applicable.</param>
/// <param name="BarnesAndNobleId">The Barnes &amp; Noble ID of the book, if applicable.</param>
/// <param name="AppleBooksId">The Apple Books ID of the book, if applicable.</param>
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book.</param>
/// <param name="Contributors">The list of media contributors that contributed to this book.</param>
@@ -5,8 +5,6 @@
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>