mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Merge pull request #290 from BinaryAlley/documentation/enforce-xml-documentation
Enforces XML documentation on public members
This commit is contained in:
202 files changed
+3901
-98
No files matched your search
@@ -19,7 +19,7 @@
|
|||||||
- Contributors are expected to add themselves to the list at the end of this file.
|
- Contributors are expected to add themselves to the list at the end of this file.
|
||||||
|
|
||||||
## Documentation Standards
|
## Documentation Standards
|
||||||
- **Every** construct (class, interface, struct, record, method, property, etc.) should have documentation. For example:
|
- **Every** construct (class, interface, struct, record, method, property, etc.) should have documentation. Every production project generates an XML documentation file and treats a missing XML comment on a publicly visible member (CS1591) as an error, so undocumented public API fails the build. For example:
|
||||||
```csharp
|
```csharp
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a user in the application.
|
/// Represents a user in the application.
|
||||||
@@ -41,7 +41,7 @@ public class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query for getting a user identified by <param name="UserId">.
|
/// Query for getting a user identified by <paramref name="UserId"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="UserId">The id of the user to get.</param>
|
/// <param name="UserId">The id of the user to get.</param>
|
||||||
public record GetUserQuery(int UserId);
|
public record GetUserQuery(int UserId);
|
||||||
@@ -68,14 +68,14 @@ public enum ThemeStyle
|
|||||||
public interface IUserService
|
public interface IUserService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a user identified by <param name="userId">.
|
/// Gets a user identified by <paramref name="userId"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userId">The unique identifier of the user.</param>
|
/// <param name="userId">The unique identifier of the user.</param>
|
||||||
/// <returns>The user associated with the specified identifier.</returns>
|
/// <returns>The user associated with the specified identifier.</returns>
|
||||||
User GetUserById(Guid userId);
|
User GetUserById(Guid userId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the profile of the specified <param name="user">.
|
/// Updates the profile of the specified <paramref name="user"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user object containing updated information.</param>
|
/// <param name="user">The user object containing updated information.</param>
|
||||||
void UpdateUserProfile(User user);
|
void UpdateUserProfile(User user);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ This project enforces many style rules via `.editorconfig` as build errors, so t
|
|||||||
- **Naming quality**: names must be explicit, even if long. Domain names must match the project's Ubiquitous Language exactly. Lambda parameters must be named descriptively, never single letters or shortened anti-pattern names (no `x`, `e`, `s`, etc).
|
- **Naming quality**: names must be explicit, even if long. Domain names must match the project's Ubiquitous Language exactly. Lambda parameters must be named descriptively, never single letters or shortened anti-pattern names (no `x`, `e`, `s`, etc).
|
||||||
- **Domain nullability**: domain code must never use nullable value types or reference nulls directly, it must use the `Optional<T>` and `Result<T>` types instead. Flag any raw `null`/`?` usage in domain code.
|
- **Domain nullability**: domain code must never use nullable value types or reference nulls directly, it must use the `Optional<T>` and `Result<T>` types instead. Flag any raw `null`/`?` usage in domain code.
|
||||||
- **Comments**: should explain *why*, not *what* (the code already shows what). Wrap only when substantially exceeding a 1920px monitor's width. Flag comments that just restate the code. Comment text is written as a sentence: the first word is capitalized and the sentence ends with a period, in every code file the repository contains (C#, JavaScript, CSS, Razor, HTML, MSBuild/XML, SVG, YAML, Dockerfiles, and the bundled theme archives). Generated files (`*.Designer.cs`, `*ModelSnapshot.cs`, `AssemblyInfo.cs`) and tool configuration files (`.editorconfig`, `.gitignore`) are excluded. Section labels and marker comments follow the same rule, except the `// Arrange`, `// Act` and `// Assert` markers, which are always written bare, without a period. `TODO`, `FIXME`, `HACK`, `XXX` and `NOTE` already provide the capitalized first word, so the body after the colon is written in lowercase, unless it starts with a proper noun or a code identifier. Commented-out code is not prose and is left exactly as written.
|
- **Comments**: should explain *why*, not *what* (the code already shows what). Wrap only when substantially exceeding a 1920px monitor's width. Flag comments that just restate the code. Comment text is written as a sentence: the first word is capitalized and the sentence ends with a period, in every code file the repository contains (C#, JavaScript, CSS, Razor, HTML, MSBuild/XML, SVG, YAML, Dockerfiles, and the bundled theme archives). Generated files (`*.Designer.cs`, `*ModelSnapshot.cs`, `AssemblyInfo.cs`) and tool configuration files (`.editorconfig`, `.gitignore`) are excluded. Section labels and marker comments follow the same rule, except the `// Arrange`, `// Act` and `// Assert` markers, which are always written bare, without a period. `TODO`, `FIXME`, `HACK`, `XXX` and `NOTE` already provide the capitalized first word, so the body after the colon is written in lowercase, unless it starts with a proper noun or a code identifier. Commented-out code is not prose and is left exactly as written.
|
||||||
- **XML documentation**: required on every public construct, and also on private properties and methods. Use `<see langword="etc"/>` for language keywords, not `<c>etc</c>`. Method summaries must not expose internal implementation details, unless truly relevant, in which case put that detail in a `<remarks>` block instead of the summary.
|
- **XML documentation**: required on every public construct, and also on private properties and methods. Every production project generates an XML documentation file and treats CS1591 as an error, so an undocumented publicly visible member fails the build; private properties and methods remain a review rule. Use `<see langword="etc"/>` for language keywords, not `<c>etc</c>`. Method summaries must not expose internal implementation details, unless truly relevant, in which case put that detail in a `<remarks>` block instead of the summary.
|
||||||
- **`<inheritdoc/>`**: avoid on classes implementing interface members. Developers usually work in the implementing class and should see documentation there directly, without having to open the interface.
|
- **`<inheritdoc/>`**: avoid on classes implementing interface members. Developers usually work in the implementing class and should see documentation there directly, without having to open the interface.
|
||||||
- **Boolean naming**: boolean fields, properties, and methods returning booleans must start with a verb implying true/false: `is`, `are`, `should`, `has`, `was`, `can`, etc.
|
- **Boolean naming**: boolean fields, properties, and methods returning booleans must start with a verb implying true/false: `is`, `are`, `should`, `has`, `was`, `can`, etc.
|
||||||
- **Error handling**: rule violations return `Result<T>`. Never throw exceptions unless explicitly justified (e.g. startup/configuration code). Flag any `throw` outside that context.
|
- **Error handling**: rule violations return `Result<T>`. Never throw exceptions unless explicitly justified (e.g. startup/configuration code). Flag any `throw` outside that context.
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<Project>
|
||||||
|
<!-- Shared warning and documentation policy for every plugin project under plugins. -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<WarningsAsErrors>$(WarningsAsErrors);CS1591</WarningsAsErrors><!--Public members must have XML documentation.-->
|
||||||
|
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\plugins\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<Project>
|
||||||
|
<!-- Shared warning and documentation policy for every production project under src. -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<WarningsAsErrors>$(WarningsAsErrors);CS1591</WarningsAsErrors><!--Public members must have XML documentation.-->
|
||||||
|
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
+4
-4
@@ -142,9 +142,9 @@ public class BookEntity : IStorageEntity, IAuditableEntity
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public float? VolumeNumber { get; set; }
|
public float? VolumeNumber { get; set; }
|
||||||
// TODO: uncomment when series is implemented.
|
// TODO: uncomment when series is implemented.
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// Gets or sets the series id, if the book is part of a series.
|
///// Gets or sets the series id, if the book is part of a series.
|
||||||
/// </summary>
|
///// </summary>
|
||||||
//public Guid? BookSeriesId { get; set; }
|
//public Guid? BookSeriesId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -183,7 +183,7 @@ public class BookEntity : IStorageEntity, IAuditableEntity
|
|||||||
public string? GoogleBooksId { get; set; }
|
public string? GoogleBooksId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Barnes & Noble ID of the book.
|
/// Gets or sets the Barnes & Noble ID of the book.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? BarnesAndNobleId { get; set; }
|
public string? BarnesAndNobleId { get; set; }
|
||||||
|
|
||||||
|
|||||||
+1
@@ -23,6 +23,7 @@ public interface ILibraryScanRepository : IRepository<LibraryScanEntity>,
|
|||||||
/// <summary>
|
/// <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.
|
/// 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>
|
/// </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>
|
/// <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>
|
/// <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);
|
Task<Result<IEnumerable<LibraryScanEntity>>> GetPastMonthScansByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken);
|
||||||
|
|||||||
@@ -9,25 +9,99 @@ namespace Lumina.Application.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Error types for application authentication operations.
|
||||||
|
/// </summary>
|
||||||
public static class Authentication
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
public static Error PasswordResetAlreadyRequested => Error.Failure(description: nameof(PasswordResetAlreadyRequested));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,24 +9,94 @@ namespace Lumina.Application.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Error types for application authorization operations.
|
||||||
|
/// </summary>
|
||||||
public static class Authorization
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
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));
|
public static Error UserMustHaveRoleOrDirectPermissions => Error.Forbidden(description: nameof(UserMustHaveRoleOrDirectPermissions));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,11 +9,29 @@ namespace Lumina.Application.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Error types for application persistence operations.
|
||||||
|
/// </summary>
|
||||||
public static class Persistence
|
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));
|
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));
|
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));
|
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));
|
public static Error ConcurrencyConflict => Error.Conflict(description: nameof(ConcurrencyConflict));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
@@ -10,6 +10,9 @@ namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration;
|
|||||||
[DebuggerDisplay("{SECTION_NAME}")]
|
[DebuggerDisplay("{SECTION_NAME}")]
|
||||||
public class MediaSettingsDto
|
public class MediaSettingsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the media settings.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "MediaSettings";
|
public const string SECTION_NAME = "MediaSettings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+3
@@ -10,6 +10,9 @@ namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration;
|
|||||||
[DebuggerDisplay("{SECTION_NAME}")]
|
[DebuggerDisplay("{SECTION_NAME}")]
|
||||||
public class PluginsSettingsDto
|
public class PluginsSettingsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the plugins settings.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "PluginsSettings";
|
public const string SECTION_NAME = "PluginsSettings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ public static class FileSystemItemMapping
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts <paramref name="domainEntities"/> to <see cref="IEnumerable<FileSystemTreeNodeResponse>"/>.
|
/// Converts <paramref name="domainEntities"/> to a collection of <see cref="FileSystemTreeNodeResponse"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="domainEntities">The domain entities to be converted.</param>
|
/// <param name="domainEntities">The domain entities to be converted.</param>
|
||||||
/// <returns>The converted entities.</returns>
|
/// <returns>The converted entities.</returns>
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ namespace Lumina.Application.Common.Mapping.FileSystemManagement.Files;
|
|||||||
public static class GetTreeFilesRequestMapping
|
public static class GetTreeFilesRequestMapping
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts <paramref name="request"/> to <see cref="GetTreeDirectoriesQuery"/>.
|
/// Converts <paramref name="request"/> to <see cref="GetTreeFilesQuery"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">The request to be converted.</param>
|
/// <param name="request">The request to be converted.</param>
|
||||||
/// <returns>The converted query.</returns>
|
/// <returns>The converted query.</returns>
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ public static class ValidatorUtilities
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// If the property is <see langword="null"/> or not a string, this rule fails (use
|
/// 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>
|
/// </remarks>
|
||||||
/// <typeparam name="TRequest">The type of the request being validated.</typeparam>
|
/// <typeparam name="TRequest">The type of the request being validated.</typeparam>
|
||||||
/// <typeparam name="TProperty">The type of the property being validated.</typeparam>
|
/// <typeparam name="TProperty">The type of the property being validated.</typeparam>
|
||||||
|
|||||||
+1
-1
@@ -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.
|
/// Commits the deletion of a stale or orphan resume point, so that the cleanup survives the not-found response of this query.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <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
|
/// 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.
|
/// 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>
|
/// </remarks>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ namespace Lumina.Application.Core.MediaLibrary.AudioLibrary.MusicLibrary.Playbac
|
|||||||
/// Defines the format of the opaque delivery handle of a playback manifest.
|
/// Defines the format of the opaque delivery handle of a playback manifest.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <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.
|
/// and consumer of a handle uses this rule, so a handle is never silently normalized into another value.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static class PlaybackDeliveryId
|
public static class PlaybackDeliveryId
|
||||||
|
|||||||
+1
-1
@@ -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="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="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="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 & Noble ID of the book, if applicable.</param>
|
||||||
/// <param name="AppleBooksId">The Apple Books 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="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>
|
/// <param name="Contributors">The list of media contributors that contributed to this book.</param>
|
||||||
|
|||||||
+1
-1
@@ -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="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="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="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 & Noble ID of the book, if applicable.</param>
|
||||||
/// <param name="AppleBooksId">The Apple Books 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="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>
|
/// <param name="Contributors">The list of media contributors that contributed to this book.</param>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace Lumina.Contracts.DTO.MediaLibrary.Management;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Data transfer object for a media library content location.
|
/// Data transfer object for a media library content location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="Path">The file system path of the content location.</param>
|
||||||
[DebuggerDisplay("Path: {Path}")]
|
[DebuggerDisplay("Path: {Path}")]
|
||||||
public record LibraryContentLocationDto(
|
public record LibraryContentLocationDto(
|
||||||
string Path
|
string Path
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra
|
|||||||
/// <param name="OpenLibraryId">The Open Library Id of the book. Optional.</param>
|
/// <param name="OpenLibraryId">The Open Library Id of the book. Optional.</param>
|
||||||
/// <param name="LibraryThingId">The LibraryThing Id of the book. Optional.</param>
|
/// <param name="LibraryThingId">The LibraryThing Id of the book. Optional.</param>
|
||||||
/// <param name="GoogleBooksId">The Google Books Id of the book. Optional.</param>
|
/// <param name="GoogleBooksId">The Google Books Id of the book. Optional.</param>
|
||||||
/// <param name="BarnesAndNobleId">The Barnes & Noble Id of the book. Optional.</param>
|
/// <param name="BarnesAndNobleId">The Barnes & Noble Id of the book. Optional.</param>
|
||||||
/// <param name="AppleBooksId">The Apple Books Id of the book. Optional.</param>
|
/// <param name="AppleBooksId">The Apple Books Id of the book. Optional.</param>
|
||||||
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book. Required.</param>
|
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book. Required.</param>
|
||||||
/// <param name="Contributors">The list of media contributors of the book. Required.</param>
|
/// <param name="Contributors">The list of media contributors of the book. Required.</param>
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra
|
|||||||
/// <param name="OpenLibraryId">The Open Library Id of the book. Optional.</param>
|
/// <param name="OpenLibraryId">The Open Library Id of the book. Optional.</param>
|
||||||
/// <param name="LibraryThingId">The LibraryThing Id of the book. Optional.</param>
|
/// <param name="LibraryThingId">The LibraryThing Id of the book. Optional.</param>
|
||||||
/// <param name="GoogleBooksId">The Google Books Id of the book. Optional.</param>
|
/// <param name="GoogleBooksId">The Google Books Id of the book. Optional.</param>
|
||||||
/// <param name="BarnesAndNobleId">The Barnes & Noble Id of the book. Optional.</param>
|
/// <param name="BarnesAndNobleId">The Barnes & Noble Id of the book. Optional.</param>
|
||||||
/// <param name="AppleBooksId">The Apple Books Id of the book. Optional.</param>
|
/// <param name="AppleBooksId">The Apple Books Id of the book. Optional.</param>
|
||||||
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book. Required.</param>
|
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book. Required.</param>
|
||||||
/// <param name="Contributors">The list of media contributors of the book. Required.</param>
|
/// <param name="Contributors">The list of media contributors of the book. Required.</param>
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibr
|
|||||||
/// <param name="OpenLibraryId">The Open Library ID of the book, if applicable.</param>
|
/// <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="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="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 & Noble ID of the book, if applicable.</param>
|
||||||
/// <param name="AppleBooksId">The Apple Books 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="ISBNs">The list of ISBN (International Standard Book Number) of the book.</param>
|
||||||
/// <param name="Contributors">The list of references to the media contributors that contributed to this book, each with the role they played.</param>
|
/// <param name="Contributors">The list of references to the media contributors that contributed to this book, each with the role they played.</param>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Diagnostics;
|
|||||||
|
|
||||||
namespace Lumina.Contracts.Responses.UsersManagement;
|
namespace Lumina.Contracts.Responses.UsersManagement;
|
||||||
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
/// Represents a response for verifying the initialization status of the application.
|
/// Represents a response for verifying the initialization status of the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="IsInitialized">Indicates whether the application has been run before, and the super admin account has been created.</param>
|
/// <param name="IsInitialized">Indicates whether the application has been run before, and the super admin account has been created.</param>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Lumina.DataAccess.Common.Dapper;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The SQLite provider stores <see cref="Guid"/> columns as upper case TEXT. Dapper falls back to Convert.ChangeType when materializing
|
/// The SQLite provider stores <see cref="Guid"/> columns as upper case TEXT. Dapper falls back to Convert.ChangeType when materializing
|
||||||
/// such columns into <see cref="Guid"/> properties. <see cref="Guid"/> has no string <see cref="TypeConverter"/>, so that conversion
|
/// such columns into <see cref="Guid"/> properties. <see cref="Guid"/> has no string <see cref="System.ComponentModel.TypeConverter"/>, so that conversion
|
||||||
/// throws an <see cref="InvalidCastException"/>; this handler performs the conversion explicitly instead, and writes the same upper case
|
/// throws an <see cref="InvalidCastException"/>; this handler performs the conversion explicitly instead, and writes the same upper case
|
||||||
/// representation so raw key comparisons and foreign keys match the rows created by Entity Framework.
|
/// representation so raw key comparisons and foreign keys match the rows created by Entity Framework.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ internal sealed class RoleRepository : IRoleRepository
|
|||||||
/// Gets a <see cref="RoleEntity"/> identified by <paramref name="id"/> from the storage medium.
|
/// Gets a <see cref="RoleEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The id of the authorization role to get.</param>
|
/// <param name="id">The id of the authorization role to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the role should be loaded together with the role itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved role should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="RoleEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="RoleEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||||
public async Task<Result<RoleEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<RoleEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ internal sealed class BookRepository : IBookRepository
|
|||||||
/// Gets a book by its Id.
|
/// Gets a book by its Id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The Id of the book to get.</param>
|
/// <param name="id">The Id of the book to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the book should be loaded together with the book itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved book should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="BookEntity"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="BookEntity"/>, or an error.</returns>
|
||||||
public async Task<Result<BookEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<BookEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ internal sealed class LibraryRepository : ILibraryRepository
|
|||||||
/// Gets a <see cref="LibraryEntity"/> identified by <paramref name="id"/> from the storage medium.
|
/// Gets a <see cref="LibraryEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The Id of the library to get.</param>
|
/// <param name="id">The Id of the library to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the library should be loaded together with the library itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved library should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="LibraryEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="LibraryEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||||
public async Task<Result<LibraryEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<LibraryEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ internal sealed class LibraryScanRepository : ILibraryScanRepository
|
|||||||
/// Gets a <see cref="LibraryScanEntity"/> identified by <paramref name="id"/> from the storage medium.
|
/// Gets a <see cref="LibraryScanEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The id of the library scan to get.</param>
|
/// <param name="id">The id of the library scan to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the library scan should be loaded together with the library scan itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved library scan should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="LibraryScanEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="LibraryScanEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||||
public async Task<Result<LibraryScanEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<LibraryScanEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
@@ -71,6 +73,7 @@ internal sealed class LibraryScanRepository : ILibraryScanRepository
|
|||||||
/// <summary>
|
/// <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.
|
/// 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>
|
/// </summary>
|
||||||
|
/// <param name="libraryId">The Id of the media library whose scans are retrieved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</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>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a collection of <see cref="LibraryScanEntity"/>, or an error.</returns>
|
||||||
public async Task<Result<IEnumerable<LibraryScanEntity>>> GetPastMonthScansByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken)
|
public async Task<Result<IEnumerable<LibraryScanEntity>>> GetPastMonthScansByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken)
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ internal sealed class PluginRepository : IPluginRepository
|
|||||||
/// Gets a plugin by its Id.
|
/// Gets a plugin by its Id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The Id of the plugin to get.</param>
|
/// <param name="id">The Id of the plugin to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the plugin should be loaded together with the plugin itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved plugin should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="PluginEntity"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="PluginEntity"/>, or an error.</returns>
|
||||||
public async Task<Result<PluginEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<PluginEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ internal sealed class ScheduledJobExecutionRepository : IScheduledJobExecutionRe
|
|||||||
/// Gets an execution identified by <paramref name="id"/> from the storage medium.
|
/// Gets an execution identified by <paramref name="id"/> from the storage medium.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The id of the execution to get.</param>
|
/// <param name="id">The id of the execution to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the execution should be loaded together with the execution itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved execution should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="ScheduledJobExecutionEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="ScheduledJobExecutionEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||||
public async Task<Result<ScheduledJobExecutionEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<ScheduledJobExecutionEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ internal sealed class ScheduledJobRepository : IScheduledJobRepository
|
|||||||
/// Gets a scheduled job identified by <paramref name="id"/> from the storage medium.
|
/// Gets a scheduled job identified by <paramref name="id"/> from the storage medium.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The id of the scheduled job to get.</param>
|
/// <param name="id">The id of the scheduled job to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the scheduled job should be loaded together with the scheduled job itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved scheduled job should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="ScheduledJobEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="ScheduledJobEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||||
public async Task<Result<ScheduledJobEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<ScheduledJobEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -180,6 +180,8 @@ internal sealed class UserRepository : IUserRepository
|
|||||||
/// Gets a <see cref="UserEntity"/> identified by <paramref name="id"/> from the storage medium.
|
/// Gets a <see cref="UserEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The id of the user to get.</param>
|
/// <param name="id">The id of the user to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the user should be loaded together with the user itself.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved user should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="UserEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="UserEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||||
public async Task<Result<UserEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<UserEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ internal sealed class UserSettingsRepository : IUserSettingsRepository
|
|||||||
/// Gets the settings identified by <paramref name="id"/>, if they exist.
|
/// Gets the settings identified by <paramref name="id"/>, if they exist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The Id of the user settings to get.</param>
|
/// <param name="id">The Id of the user settings to get.</param>
|
||||||
|
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the user settings should be loaded together with the user settings themselves.</param>
|
||||||
|
/// <param name="shouldTrackEntities">Whether the retrieved user settings should be tracked by the persistence medium, so that changes to them can be saved.</param>
|
||||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing either the <see cref="UserSettingsEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing either the <see cref="UserSettingsEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||||
public async Task<Result<UserSettingsEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
public async Task<Result<UserSettingsEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class DataSeedService : IDataSeedService
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="DataSeedService"/> class.
|
/// Initializes a new instance of the <see cref="DataSeedService"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="unitOfWork">Injected unit of work for interacting with the data access layer repositories.</param
|
/// <param name="unitOfWork">Injected unit of work for interacting with the data access layer repositories.</param>
|
||||||
/// <param name="dateTimeProvider">Injected service for time related concerns.</param>
|
/// <param name="dateTimeProvider">Injected service for time related concerns.</param>
|
||||||
public DataSeedService(IUnitOfWork unitOfWork, IDateTimeProvider dateTimeProvider)
|
public DataSeedService(IUnitOfWork unitOfWork, IDateTimeProvider dateTimeProvider)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,39 +23,174 @@ namespace Lumina.DataAccess.Core.UoW;
|
|||||||
/// <remarks>To update the database: update-database -p Lumina.DataAccess -s Lumina.Presentation.Api</remarks>
|
/// <remarks>To update the database: update-database -p Lumina.DataAccess -s Lumina.Presentation.Api</remarks>
|
||||||
public class LuminaDbContext : DbContext
|
public class LuminaDbContext : DbContext
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the books stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<BookEntity> Books { get; set; } = null!;
|
public virtual DbSet<BookEntity> Books { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the artists stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<ArtistEntity> Artists { get; set; } = null!;
|
public virtual DbSet<ArtistEntity> Artists { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the albums stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<AlbumEntity> Albums { get; set; } = null!;
|
public virtual DbSet<AlbumEntity> Albums { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the tracks stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<TrackEntity> Tracks { get; set; } = null!;
|
public virtual DbSet<TrackEntity> Tracks { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the artwork of the music library items stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<MusicArtworkEntity> MusicArtwork { get; set; } = null!;
|
public virtual DbSet<MusicArtworkEntity> MusicArtwork { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the metadata extracted from the music files discovered during a scan, stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<MusicLibraryScanItemMetadataEntity> MusicLibraryScanItemMetadata { get; set; } = null!;
|
public virtual DbSet<MusicLibraryScanItemMetadataEntity> MusicLibraryScanItemMetadata { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the users stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<UserEntity> Users { get; set; } = null!;
|
public virtual DbSet<UserEntity> Users { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the settings of the users stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<UserSettingsEntity> UserSettings { get; set; } = null!;
|
public virtual DbSet<UserSettingsEntity> UserSettings { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the media libraries stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryEntity> Libraries { get; set; } = null!;
|
public virtual DbSet<LibraryEntity> Libraries { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the scans of the media libraries stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryScanEntity> LibraryScans { get; set; } = null!;
|
public virtual DbSet<LibraryScanEntity> LibraryScans { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the results of the media library scans stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryScanResultEntity> LibraryScanResults { get; set; } = null!;
|
public virtual DbSet<LibraryScanResultEntity> LibraryScanResults { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the snapshots of the media library items produced by the scans, stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryScanSnapshotEntity> LibraryScanSnapshots { get; set; } = null!;
|
public virtual DbSet<LibraryScanSnapshotEntity> LibraryScanSnapshots { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the staging results of the media library scans, holding the discovered file system items, stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryScanStagingResultsEntity> LibraryScanStagingResults { get; set; } = null!;
|
public virtual DbSet<LibraryScanStagingResultsEntity> LibraryScanStagingResults { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the fingerprints of the scanned directories, holding their last write time, stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<DirectoryScanFingerprintEntity> DirectoryScanFingerprints { get; set; } = null!;
|
public virtual DbSet<DirectoryScanFingerprintEntity> DirectoryScanFingerprints { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the authorization roles stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<RoleEntity> Roles { get; set; } = null!;
|
public virtual DbSet<RoleEntity> Roles { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the associations between users and roles stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<UserRoleEntity> UserRoles { get; set; } = null!;
|
public virtual DbSet<UserRoleEntity> UserRoles { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the authorization permissions stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<PermissionEntity> Permissions { get; set; } = null!;
|
public virtual DbSet<PermissionEntity> Permissions { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the associations between users and permissions stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<UserPermissionEntity> UserPermissions { get; set; } = null!;
|
public virtual DbSet<UserPermissionEntity> UserPermissions { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the associations between roles and permissions stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<RolePermissionEntity> RolePermissions { get; set; } = null!;
|
public virtual DbSet<RolePermissionEntity> RolePermissions { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the plugins stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<PluginEntity> Plugins { get; set; } = null!;
|
public virtual DbSet<PluginEntity> Plugins { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the metadata provider configurations of the media libraries stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryMetadataProviderConfigurationEntity> LibraryMetadataProviderConfigurations { get; set; } = null!;
|
public virtual DbSet<LibraryMetadataProviderConfigurationEntity> LibraryMetadataProviderConfigurations { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the artwork provider configurations of the media libraries stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryArtworkProviderConfigurationEntity> LibraryArtworkProviderConfigurations { get; set; } = null!;
|
public virtual DbSet<LibraryArtworkProviderConfigurationEntity> LibraryArtworkProviderConfigurations { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the book reader configurations of the media libraries stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<LibraryBookReaderConfigurationEntity> LibraryBookReaderConfigurations { get; set; } = null!;
|
public virtual DbSet<LibraryBookReaderConfigurationEntity> LibraryBookReaderConfigurations { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the themes stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<ThemeEntity> Themes { get; set; } = null!;
|
public virtual DbSet<ThemeEntity> Themes { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the media contributors stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<MediaContributorEntity> MediaContributors { get; set; } = null!;
|
public virtual DbSet<MediaContributorEntity> MediaContributors { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the participations of the media contributors in books stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<BookContributorEntity> BookContributors { get; set; } = null!;
|
public virtual DbSet<BookContributorEntity> BookContributors { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the scheduled jobs stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<ScheduledJobEntity> ScheduledJobs { get; set; } = null!;
|
public virtual DbSet<ScheduledJobEntity> ScheduledJobs { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the executions of the scheduled jobs stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<ScheduledJobExecutionEntity> ScheduledJobExecutions { get; set; } = null!;
|
public virtual DbSet<ScheduledJobExecutionEntity> ScheduledJobExecutions { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the display preferences of the scheduler page of the users stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<SchedulerDisplayPreferencesEntity> SchedulerDisplayPreferences { get; set; } = null!;
|
public virtual DbSet<SchedulerDisplayPreferencesEntity> SchedulerDisplayPreferences { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the playlists stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<PlaylistEntity> Playlists { get; set; } = null!;
|
public virtual DbSet<PlaylistEntity> Playlists { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the entries of the playlists stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<PlaylistEntryEntity> PlaylistEntries { get; set; } = null!;
|
public virtual DbSet<PlaylistEntryEntity> PlaylistEntries { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the favorites stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<FavoriteEntity> Favorites { get; set; } = null!;
|
public virtual DbSet<FavoriteEntity> Favorites { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the media consumption records stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<MediaConsumptionRecordEntity> MediaConsumptionRecords { get; set; } = null!;
|
public virtual DbSet<MediaConsumptionRecordEntity> MediaConsumptionRecords { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the media resume points stored in the database.
|
||||||
|
/// </summary>
|
||||||
public virtual DbSet<MediaResumePointEntity> MediaResumePoints { get; set; } = null!;
|
public virtual DbSet<MediaResumePointEntity> MediaResumePoints { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -198,6 +198,9 @@ public class UnitOfWork : IUnitOfWork, IDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the media contributor repository.
|
||||||
|
/// </summary>
|
||||||
public IMediaContributorRepository MediaContributorRepository
|
public IMediaContributorRepository MediaContributorRepository
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -5,9 +5,28 @@ namespace Lumina.Domain.SharedKernel.Common.Enums.Authorization;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum AuthorizationPermission
|
public enum AuthorizationPermission
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No permission is granted.
|
||||||
|
/// </summary>
|
||||||
None = 0,
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Permission to view the existing users.
|
||||||
|
/// </summary>
|
||||||
CanViewUsers,
|
CanViewUsers,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Permission to delete the existing users.
|
||||||
|
/// </summary>
|
||||||
CanDeleteUsers,
|
CanDeleteUsers,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Permission to register new users.
|
||||||
|
/// </summary>
|
||||||
CanRegisterUsers,
|
CanRegisterUsers,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Permission to create and manage media libraries.
|
||||||
|
/// </summary>
|
||||||
CanCreateLibraries
|
CanCreateLibraries
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ public enum LibraryType
|
|||||||
LiveRecordingVideo,
|
LiveRecordingVideo,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Recorded conversations and Q&A sessions in video format.
|
/// Recorded conversations and Q&A sessions in video format.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
InterviewVideo,
|
InterviewVideo,
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ public enum LibraryType
|
|||||||
LiveRecordingAudio,
|
LiveRecordingAudio,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Recorded conversations and Q&A sessions in audio format.
|
/// Recorded conversations and Q&A sessions in audio format.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
InterviewAudio,
|
InterviewAudio,
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -9,14 +9,44 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report favorite rule violations and missing favorites.
|
||||||
|
/// </summary>
|
||||||
public static class Favorites
|
public static class Favorites
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested favorite was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error FavoriteNotFound => Error.NotFound(description: nameof(FavoriteNotFound));
|
public static Error FavoriteNotFound => Error.NotFound(description: nameof(FavoriteNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the user already has the media item in favorites.
|
||||||
|
/// </summary>
|
||||||
public static Error FavoriteAlreadyExists => Error.Conflict(description: nameof(FavoriteAlreadyExists));
|
public static Error FavoriteAlreadyExists => Error.Conflict(description: nameof(FavoriteAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the favorite media kind is not a defined value.
|
||||||
|
/// </summary>
|
||||||
public static Error FavoriteMediaKindIsInvalid => Error.Validation(description: nameof(FavoriteMediaKindIsInvalid));
|
public static Error FavoriteMediaKindIsInvalid => Error.Validation(description: nameof(FavoriteMediaKindIsInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media kind cannot be favorited because no library provides it yet.
|
||||||
|
/// </summary>
|
||||||
public static Error FavoriteMediaKindIsNotSupported => Error.Validation(description: nameof(FavoriteMediaKindIsNotSupported));
|
public static Error FavoriteMediaKindIsNotSupported => Error.Validation(description: nameof(FavoriteMediaKindIsNotSupported));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media item identifier of the favorite cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error FavoriteMediaItemIdCannotBeEmpty => Error.Validation(description: nameof(FavoriteMediaItemIdCannotBeEmpty));
|
public static Error FavoriteMediaItemIdCannotBeEmpty => Error.Validation(description: nameof(FavoriteMediaItemIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the list of media item identifiers cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error FavoriteMediaItemIdsCannotBeEmpty => Error.Validation(description: nameof(FavoriteMediaItemIdsCannotBeEmpty));
|
public static Error FavoriteMediaItemIdsCannotBeEmpty => Error.Validation(description: nameof(FavoriteMediaItemIdsCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the list of media item identifiers exceeds the maximum allowed count.
|
||||||
|
/// </summary>
|
||||||
public static Error FavoriteMediaItemIdsExceedMaximumCount => Error.Validation(description: nameof(FavoriteMediaItemIdsExceedMaximumCount));
|
public static Error FavoriteMediaItemIdsExceedMaximumCount => Error.Validation(description: nameof(FavoriteMediaItemIdsExceedMaximumCount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,28 +9,114 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report file system navigation, validation and operation failures.
|
||||||
|
/// </summary>
|
||||||
public static class FileSystemManagement
|
public static class FileSystemManagement
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a file system operation failed because its parent node is <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ParentNodeCannotBeNull => Error.Failure(description: nameof(ParentNodeCannotBeNull));
|
public static Error ParentNodeCannotBeNull => Error.Failure(description: nameof(ParentNodeCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a file system operation failed because the path exceeds the maximum length of 260 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error PathMustBeMaximum260CharactersLong => Error.Failure(description: nameof(PathMustBeMaximum260CharactersLong));
|
public static Error PathMustBeMaximum260CharactersLong => Error.Failure(description: nameof(PathMustBeMaximum260CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that copying a file failed.
|
||||||
|
/// </summary>
|
||||||
public static Error FileCopyError => Error.Failure(description: nameof(FileCopyError));
|
public static Error FileCopyError => Error.Failure(description: nameof(FileCopyError));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that moving a file failed.
|
||||||
|
/// </summary>
|
||||||
public static Error FileMoveError => Error.Failure(description: nameof(FileMoveError));
|
public static Error FileMoveError => Error.Failure(description: nameof(FileMoveError));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that deleting a file failed.
|
||||||
|
/// </summary>
|
||||||
public static Error FileDeleteError => Error.Failure(description: nameof(FileDeleteError));
|
public static Error FileDeleteError => Error.Failure(description: nameof(FileDeleteError));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that copying a directory failed.
|
||||||
|
/// </summary>
|
||||||
public static Error DirectoryCopyError => Error.Failure(description: nameof(DirectoryCopyError));
|
public static Error DirectoryCopyError => Error.Failure(description: nameof(DirectoryCopyError));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that moving a directory failed.
|
||||||
|
/// </summary>
|
||||||
public static Error DirectoryMoveError => Error.Failure(description: nameof(DirectoryMoveError));
|
public static Error DirectoryMoveError => Error.Failure(description: nameof(DirectoryMoveError));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested file was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error FileNotFound => Error.NotFound(description: nameof(FileNotFound));
|
public static Error FileNotFound => Error.NotFound(description: nameof(FileNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file system path is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidPath => Error.Validation(description: nameof(InvalidPath));
|
public static Error InvalidPath => Error.Validation(description: nameof(InvalidPath));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file system path cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PathCannotBeEmpty => Error.Validation(description: nameof(PathCannotBeEmpty));
|
public static Error PathCannotBeEmpty => Error.Validation(description: nameof(PathCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file extension cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ExtensionCannotBeEmpty => Error.Validation(description: nameof(ExtensionCannotBeEmpty));
|
public static Error ExtensionCannotBeEmpty => Error.Validation(description: nameof(ExtensionCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the stream identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error StreamIdCannotBeEmpty => Error.Validation(description: nameof(StreamIdCannotBeEmpty));
|
public static Error StreamIdCannotBeEmpty => Error.Validation(description: nameof(StreamIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the codec name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error CodecCannotBeEmpty => Error.Validation(description: nameof(CodecCannotBeEmpty));
|
public static Error CodecCannotBeEmpty => Error.Validation(description: nameof(CodecCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the bitrate must be a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error BitrateMustBeAPositiveNumber => Error.Validation(description: nameof(BitrateMustBeAPositiveNumber));
|
public static Error BitrateMustBeAPositiveNumber => Error.Validation(description: nameof(BitrateMustBeAPositiveNumber));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file system browser cannot navigate above the root directory.
|
||||||
|
/// </summary>
|
||||||
public static Error CannotNavigateUp => Error.Failure(description: nameof(CannotNavigateUp));
|
public static Error CannotNavigateUp => Error.Failure(description: nameof(CannotNavigateUp));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of the file system node cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error NameCannotBeEmpty => Error.Validation(description: nameof(NameCannotBeEmpty));
|
public static Error NameCannotBeEmpty => Error.Validation(description: nameof(NameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error FileNameCannotBeEmpty => Error.Validation(description: nameof(FileNameCannotBeEmpty));
|
public static Error FileNameCannotBeEmpty => Error.Validation(description: nameof(FileNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a file with the same name already exists in the target directory.
|
||||||
|
/// </summary>
|
||||||
public static Error FileAlreadyExists => Error.Conflict(description: nameof(FileAlreadyExists));
|
public static Error FileAlreadyExists => Error.Conflict(description: nameof(FileAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested directory was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error DirectoryNotFound => Error.NotFound(description: nameof(DirectoryNotFound));
|
public static Error DirectoryNotFound => Error.NotFound(description: nameof(DirectoryNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a directory with the same name already exists in the target location.
|
||||||
|
/// </summary>
|
||||||
public static Error DirectoryAlreadyExists => Error.Conflict(description: nameof(DirectoryAlreadyExists));
|
public static Error DirectoryAlreadyExists => Error.Conflict(description: nameof(DirectoryAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file exceeds the maximum allowed size.
|
||||||
|
/// </summary>
|
||||||
public static Error FileTooLarge => Error.Validation(description: nameof(FileTooLarge));
|
public static Error FileTooLarge => Error.Validation(description: nameof(FileTooLarge));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,27 +9,109 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report media library rule violations and missing libraries.
|
||||||
|
/// </summary>
|
||||||
public static class Library
|
public static class Library
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a locked media library cannot be scanned.
|
||||||
|
/// </summary>
|
||||||
public static Error CannotScanLockedLibrary => Error.Forbidden(description: nameof(CannotScanLockedLibrary));
|
public static Error CannotScanLockedLibrary => Error.Forbidden(description: nameof(CannotScanLockedLibrary));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a disabled media library cannot be scanned.
|
||||||
|
/// </summary>
|
||||||
public static Error CannotScanDisabledLibrary => Error.Forbidden(description: nameof(CannotScanDisabledLibrary));
|
public static Error CannotScanDisabledLibrary => Error.Forbidden(description: nameof(CannotScanDisabledLibrary));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryIdCannotBeEmpty => Error.Validation(description: nameof(LibraryIdCannotBeEmpty));
|
public static Error LibraryIdCannotBeEmpty => Error.Validation(description: nameof(LibraryIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a library-scoped filter must include a library identifier.
|
||||||
|
/// </summary>
|
||||||
public static Error FilterMustIncludeLibraryId => Error.Validation(description: nameof(FilterMustIncludeLibraryId));
|
public static Error FilterMustIncludeLibraryId => Error.Validation(description: nameof(FilterMustIncludeLibraryId));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the alphabetical filter key is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidFilterAlphaKey => Error.Validation(description: nameof(InvalidFilterAlphaKey));
|
public static Error InvalidFilterAlphaKey => Error.Validation(description: nameof(InvalidFilterAlphaKey));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a media library with the same identifier already exists.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryAlreadyExists => Error.Conflict(description: nameof(LibraryAlreadyExists));
|
public static Error LibraryAlreadyExists => Error.Conflict(description: nameof(LibraryAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested media library was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryNotFound => Error.NotFound(description: nameof(LibraryNotFound));
|
public static Error LibraryNotFound => Error.NotFound(description: nameof(LibraryNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library type must not be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryTypeCannotBeNull => Error.Validation(description: nameof(LibraryTypeCannotBeNull));
|
public static Error LibraryTypeCannotBeNull => Error.Validation(description: nameof(LibraryTypeCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library cover file must be an image.
|
||||||
|
/// </summary>
|
||||||
public static Error CoverFileMustBeAnImage => Error.Validation(description: nameof(CoverFileMustBeAnImage));
|
public static Error CoverFileMustBeAnImage => Error.Validation(description: nameof(CoverFileMustBeAnImage));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the operation cannot be performed because the library type is not recognized.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownLibraryType => Error.Forbidden(description: nameof(UnknownLibraryType));
|
public static Error UnknownLibraryType => Error.Forbidden(description: nameof(UnknownLibraryType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the list of library content paths must not be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error PathsListCannotBeNull => Error.Validation(description: nameof(PathsListCannotBeNull));
|
public static Error PathsListCannotBeNull => Error.Validation(description: nameof(PathsListCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the list of library content paths cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PathsListCannotBeEmpty => Error.Validation(description: nameof(PathsListCannotBeEmpty));
|
public static Error PathsListCannotBeEmpty => Error.Validation(description: nameof(PathsListCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library title cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error TitleCannotBeEmpty => Error.Validation(description: nameof(TitleCannotBeEmpty));
|
public static Error TitleCannotBeEmpty => Error.Validation(description: nameof(TitleCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library title exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error TitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(TitleMustBeMaximum255CharactersLong));
|
public static Error TitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(TitleMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a literal part of the path template cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PathTemplateLiteralCannotBeEmpty => Error.Validation(description: nameof(PathTemplateLiteralCannotBeEmpty));
|
public static Error PathTemplateLiteralCannotBeEmpty => Error.Validation(description: nameof(PathTemplateLiteralCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a value part of the path template must contain exactly one placeholder.
|
||||||
|
/// </summary>
|
||||||
public static Error PathTemplateValuePartMustContainSinglePlaceholder => Error.Validation(description: nameof(PathTemplateValuePartMustContainSinglePlaceholder));
|
public static Error PathTemplateValuePartMustContainSinglePlaceholder => Error.Validation(description: nameof(PathTemplateValuePartMustContainSinglePlaceholder));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a path template part kind is not supported for the library type.
|
||||||
|
/// </summary>
|
||||||
public static Error PathTemplatePartKindNotSupportedForLibraryType => Error.Validation(description: nameof(PathTemplatePartKindNotSupportedForLibraryType));
|
public static Error PathTemplatePartKindNotSupportedForLibraryType => Error.Validation(description: nameof(PathTemplatePartKindNotSupportedForLibraryType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that path templates are not supported for the library type.
|
||||||
|
/// </summary>
|
||||||
public static Error PathTemplateIsNotSupportedForLibraryType => Error.Validation(description: nameof(PathTemplateIsNotSupportedForLibraryType));
|
public static Error PathTemplateIsNotSupportedForLibraryType => Error.Validation(description: nameof(PathTemplateIsNotSupportedForLibraryType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the completion threshold percentage must be omitted when progress tracking is disabled.
|
||||||
|
/// </summary>
|
||||||
public static Error CompletionThresholdPercentageMustBeNullWhenProgressTrackingIsOff => Error.Validation(description: nameof(CompletionThresholdPercentageMustBeNullWhenProgressTrackingIsOff));
|
public static Error CompletionThresholdPercentageMustBeNullWhenProgressTrackingIsOff => Error.Validation(description: nameof(CompletionThresholdPercentageMustBeNullWhenProgressTrackingIsOff));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the completion threshold percentage must be between 0 and 100.
|
||||||
|
/// </summary>
|
||||||
public static Error CompletionThresholdPercentageMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(CompletionThresholdPercentageMustBeBetweenZeroAndOneHundred));
|
public static Error CompletionThresholdPercentageMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(CompletionThresholdPercentageMustBeBetweenZeroAndOneHundred));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,24 +9,94 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report media library scan rule violations and missing scans.
|
||||||
|
/// </summary>
|
||||||
public static class LibraryScanning
|
public static class LibraryScanning
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library scan identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryScanIdCannotBeEmpty => Error.Validation(description: nameof(LibraryScanIdCannotBeEmpty));
|
public static Error LibraryScanIdCannotBeEmpty => Error.Validation(description: nameof(LibraryScanIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that only a pending scan can be started.
|
||||||
|
/// </summary>
|
||||||
public static Error CanOnlyStartPendingScans => Error.Forbidden(description: nameof(CanOnlyStartPendingScans));
|
public static Error CanOnlyStartPendingScans => Error.Forbidden(description: nameof(CanOnlyStartPendingScans));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that only a running scan can be completed.
|
||||||
|
/// </summary>
|
||||||
public static Error CanOnlyCompleteRunningScans => Error.Forbidden(description: nameof(CanOnlyCompleteRunningScans));
|
public static Error CanOnlyCompleteRunningScans => Error.Forbidden(description: nameof(CanOnlyCompleteRunningScans));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that only a pending or running scan can be cancelled.
|
||||||
|
/// </summary>
|
||||||
public static Error CanOnlyCancelPendingOrRunningScans => Error.Forbidden(description: nameof(CanOnlyCancelPendingOrRunningScans));
|
public static Error CanOnlyCancelPendingOrRunningScans => Error.Forbidden(description: nameof(CanOnlyCancelPendingOrRunningScans));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that only a pending or running scan can be marked as failed.
|
||||||
|
/// </summary>
|
||||||
public static Error CanOnlyFailPendingOrRunningScans => Error.Forbidden(description: nameof(CanOnlyFailPendingOrRunningScans));
|
public static Error CanOnlyFailPendingOrRunningScans => Error.Forbidden(description: nameof(CanOnlyFailPendingOrRunningScans));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the scan identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ScanIdCannotBeEmpty => Error.Validation(description: nameof(ScanIdCannotBeEmpty));
|
public static Error ScanIdCannotBeEmpty => Error.Validation(description: nameof(ScanIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a media library scan with the same identifier already exists.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryScanAlreadyExists => Error.Conflict(description: nameof(LibraryScanAlreadyExists));
|
public static Error LibraryScanAlreadyExists => Error.Conflict(description: nameof(LibraryScanAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library is already being scanned.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryAlreadyBeingScanned => Error.Forbidden(description: nameof(LibraryAlreadyBeingScanned));
|
public static Error LibraryAlreadyBeingScanned => Error.Forbidden(description: nameof(LibraryAlreadyBeingScanned));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested library scan was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryScanNotFound => Error.NotFound(description: nameof(LibraryScanNotFound));
|
public static Error LibraryScanNotFound => Error.NotFound(description: nameof(LibraryScanNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the total scan job items count cannot be negative.
|
||||||
|
/// </summary>
|
||||||
public static Error TotalScanJobItemsCountMustBePositive => Error.Validation(description: nameof(TotalScanJobItemsCountMustBePositive));
|
public static Error TotalScanJobItemsCountMustBePositive => Error.Validation(description: nameof(TotalScanJobItemsCountMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the total scan jobs count cannot be negative, and cannot be zero unless the scan is pending.
|
||||||
|
/// </summary>
|
||||||
public static Error TotalScanJobsCountMustBePositive => Error.Validation(description: nameof(TotalScanJobsCountMustBePositive));
|
public static Error TotalScanJobsCountMustBePositive => Error.Validation(description: nameof(TotalScanJobsCountMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the completed scan job items count cannot be negative.
|
||||||
|
/// </summary>
|
||||||
public static Error CompletedScanJobItemsCountMustBePositive => Error.Validation(description: nameof(CompletedScanJobItemsCountMustBePositive));
|
public static Error CompletedScanJobItemsCountMustBePositive => Error.Validation(description: nameof(CompletedScanJobItemsCountMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the completed scan jobs count cannot be negative.
|
||||||
|
/// </summary>
|
||||||
public static Error CompletedScanJobsCountMustBePositive => Error.Validation(description: nameof(CompletedScanJobsCountMustBePositive));
|
public static Error CompletedScanJobsCountMustBePositive => Error.Validation(description: nameof(CompletedScanJobsCountMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the completed scan job items count cannot exceed the total scan job items count.
|
||||||
|
/// </summary>
|
||||||
public static Error CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount => Error.Validation(description: nameof(CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount));
|
public static Error CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount => Error.Validation(description: nameof(CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the completed scan jobs count cannot exceed the total scan jobs count.
|
||||||
|
/// </summary>
|
||||||
public static Error CompletedScanJobsCountCantExceedTotalScanJobsCount => Error.Validation(description: nameof(CompletedScanJobsCountCantExceedTotalScanJobsCount));
|
public static Error CompletedScanJobsCountCantExceedTotalScanJobsCount => Error.Validation(description: nameof(CompletedScanJobsCountCantExceedTotalScanJobsCount));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the current operation of a scan job cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ScanJobCurrentOperationCannotBeEmpty => Error.Validation(description: nameof(ScanJobCurrentOperationCannotBeEmpty));
|
public static Error ScanJobCurrentOperationCannotBeEmpty => Error.Validation(description: nameof(ScanJobCurrentOperationCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that no scanner is implemented for the requested library type.
|
||||||
|
/// </summary>
|
||||||
public static Error NoScannerForLibraryType => Error.NotImplemented(description: nameof(NoScannerForLibraryType));
|
public static Error NoScannerForLibraryType => Error.NotImplemented(description: nameof(NoScannerForLibraryType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,29 +9,119 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report media consumption rule violations and missing consumption records.
|
||||||
|
/// </summary>
|
||||||
public static class MediaConsumption
|
public static class MediaConsumption
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media kind does not support consumption tracking.
|
||||||
|
/// </summary>
|
||||||
public static Error UnsupportedMediaKind => Error.Validation(description: nameof(UnsupportedMediaKind));
|
public static Error UnsupportedMediaKind => Error.Validation(description: nameof(UnsupportedMediaKind));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media kind cannot start in a completed state because it is not a one-shot kind.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaKindCannotStartCompleted => Error.Forbidden(description: nameof(MediaKindCannotStartCompleted));
|
public static Error MediaKindCannotStartCompleted => Error.Forbidden(description: nameof(MediaKindCannotStartCompleted));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a consumption of the media kind cannot be resumed.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaKindCannotResume => Error.Forbidden(description: nameof(MediaKindCannotResume));
|
public static Error MediaKindCannotResume => Error.Forbidden(description: nameof(MediaKindCannotResume));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested consumption record was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumptionRecordNotFound => Error.NotFound(description: nameof(ConsumptionRecordNotFound));
|
public static Error ConsumptionRecordNotFound => Error.NotFound(description: nameof(ConsumptionRecordNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the resume point of the media item was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaResumePointNotFound => Error.NotFound(description: nameof(MediaResumePointNotFound));
|
public static Error MediaResumePointNotFound => Error.NotFound(description: nameof(MediaResumePointNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consumption record identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumptionRecordIdCannotBeEmpty => Error.Validation(description: nameof(ConsumptionRecordIdCannotBeEmpty));
|
public static Error ConsumptionRecordIdCannotBeEmpty => Error.Validation(description: nameof(ConsumptionRecordIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media item identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaItemIdCannotBeEmpty => Error.Validation(description: nameof(MediaItemIdCannotBeEmpty));
|
public static Error MediaItemIdCannotBeEmpty => Error.Validation(description: nameof(MediaItemIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the target user identifier is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error TargetUserIdIsInvalid => Error.Validation(description: nameof(TargetUserIdIsInvalid));
|
public static Error TargetUserIdIsInvalid => Error.Validation(description: nameof(TargetUserIdIsInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consumption date range is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumptionDateRangeIsInvalid => Error.Validation(description: nameof(ConsumptionDateRangeIsInvalid));
|
public static Error ConsumptionDateRangeIsInvalid => Error.Validation(description: nameof(ConsumptionDateRangeIsInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media position is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidMediaPosition => Error.Validation(description: nameof(InvalidMediaPosition));
|
public static Error InvalidMediaPosition => Error.Validation(description: nameof(InvalidMediaPosition));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the progress fraction is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidProgressFraction => Error.Validation(description: nameof(InvalidProgressFraction));
|
public static Error InvalidProgressFraction => Error.Validation(description: nameof(InvalidProgressFraction));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consumed duration cannot be negative.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumedDurationMustBeNonNegative => Error.Validation(description: nameof(ConsumedDurationMustBeNonNegative));
|
public static Error ConsumedDurationMustBeNonNegative => Error.Validation(description: nameof(ConsumedDurationMustBeNonNegative));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consumed duration is outside the allowed range.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumedDurationIsOutOfRange => Error.Validation(description: nameof(ConsumedDurationIsOutOfRange));
|
public static Error ConsumedDurationIsOutOfRange => Error.Validation(description: nameof(ConsumedDurationIsOutOfRange));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consumed duration cannot decrease.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumedDurationCannotDecrease => Error.Forbidden(description: nameof(ConsumedDurationCannotDecrease));
|
public static Error ConsumedDurationCannotDecrease => Error.Forbidden(description: nameof(ConsumedDurationCannotDecrease));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consecutive pages read count cannot be negative.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsecutivePagesReadMustBeNonNegative => Error.Validation(description: nameof(ConsecutivePagesReadMustBeNonNegative));
|
public static Error ConsecutivePagesReadMustBeNonNegative => Error.Validation(description: nameof(ConsecutivePagesReadMustBeNonNegative));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that consecutive pages read is only supported for page-based media.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsecutivePagesReadIsOnlySupportedForPageBasedMedia => Error.Forbidden(description: nameof(ConsecutivePagesReadIsOnlySupportedForPageBasedMedia));
|
public static Error ConsecutivePagesReadIsOnlySupportedForPageBasedMedia => Error.Forbidden(description: nameof(ConsecutivePagesReadIsOnlySupportedForPageBasedMedia));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consumption is not in progress.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumptionIsNotInProgress => Error.Conflict(description: nameof(ConsumptionIsNotInProgress));
|
public static Error ConsumptionIsNotInProgress => Error.Conflict(description: nameof(ConsumptionIsNotInProgress));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the consumption already reached a terminal state.
|
||||||
|
/// </summary>
|
||||||
public static Error ConsumptionIsAlreadyTerminal => Error.Conflict(description: nameof(ConsumptionIsAlreadyTerminal));
|
public static Error ConsumptionIsAlreadyTerminal => Error.Conflict(description: nameof(ConsumptionIsAlreadyTerminal));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a consumption in progress cannot have an end time.
|
||||||
|
/// </summary>
|
||||||
public static Error InProgressConsumptionCannotHaveEndTime => Error.Validation(description: nameof(InProgressConsumptionCannotHaveEndTime));
|
public static Error InProgressConsumptionCannotHaveEndTime => Error.Validation(description: nameof(InProgressConsumptionCannotHaveEndTime));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ended consumption must have an end time.
|
||||||
|
/// </summary>
|
||||||
public static Error EndedConsumptionMustHaveEndTime => Error.Validation(description: nameof(EndedConsumptionMustHaveEndTime));
|
public static Error EndedConsumptionMustHaveEndTime => Error.Validation(description: nameof(EndedConsumptionMustHaveEndTime));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the last activity of a consumption cannot precede its start.
|
||||||
|
/// </summary>
|
||||||
public static Error LastActivityCannotPrecedeStart => Error.Forbidden(description: nameof(LastActivityCannotPrecedeStart));
|
public static Error LastActivityCannotPrecedeStart => Error.Forbidden(description: nameof(LastActivityCannotPrecedeStart));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the end of a consumption cannot precede its last activity.
|
||||||
|
/// </summary>
|
||||||
public static Error EndedConsumptionCannotPrecedeLastActivity => Error.Forbidden(description: nameof(EndedConsumptionCannotPrecedeLastActivity));
|
public static Error EndedConsumptionCannotPrecedeLastActivity => Error.Forbidden(description: nameof(EndedConsumptionCannotPrecedeLastActivity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,20 +9,74 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report media contributor rule violations and missing contributors.
|
||||||
|
/// </summary>
|
||||||
public static class MediaContributor
|
public static class MediaContributor
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ContributorNameCannotBeEmpty => Error.Validation(description: nameof(ContributorNameCannotBeEmpty));
|
public static Error ContributorNameCannotBeEmpty => Error.Validation(description: nameof(ContributorNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor display name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ContributorDisplayNameCannotBeEmpty => Error.Validation(description: nameof(ContributorDisplayNameCannotBeEmpty));
|
public static Error ContributorDisplayNameCannotBeEmpty => Error.Validation(description: nameof(ContributorDisplayNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor display name exceeds the maximum length of 100 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error ContributorDisplayNameMustBeMaximum100CharactersLong => Error.Validation(description: nameof(ContributorDisplayNameMustBeMaximum100CharactersLong));
|
public static Error ContributorDisplayNameMustBeMaximum100CharactersLong => Error.Validation(description: nameof(ContributorDisplayNameMustBeMaximum100CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor legal name exceeds the maximum length of 100 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error ContributorLegalNameMustBeMaximum100CharactersLong => Error.Validation(description: nameof(ContributorLegalNameMustBeMaximum100CharactersLong));
|
public static Error ContributorLegalNameMustBeMaximum100CharactersLong => Error.Validation(description: nameof(ContributorLegalNameMustBeMaximum100CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor role name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error RoleNameCannotBeEmpty => Error.Validation(description: nameof(RoleNameCannotBeEmpty));
|
public static Error RoleNameCannotBeEmpty => Error.Validation(description: nameof(RoleNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor role name exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error RoleNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(RoleNameMustBeMaximum50CharactersLong));
|
public static Error RoleNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(RoleNameMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor role category cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error RoleCategoryCannotBeEmpty => Error.Validation(description: nameof(RoleCategoryCannotBeEmpty));
|
public static Error RoleCategoryCannotBeEmpty => Error.Validation(description: nameof(RoleCategoryCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributor role must not be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ContributorRoleCannotBeNull => Error.Validation(description: nameof(ContributorRoleCannotBeNull));
|
public static Error ContributorRoleCannotBeNull => Error.Validation(description: nameof(ContributorRoleCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the contributors list must not be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ContributorsListCannotBeNull => Error.Validation(description: nameof(ContributorsListCannotBeNull));
|
public static Error ContributorsListCannotBeNull => Error.Validation(description: nameof(ContributorsListCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media contributor identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaContributorIdCannotBeEmpty => Error.Validation(description: nameof(MediaContributorIdCannotBeEmpty));
|
public static Error MediaContributorIdCannotBeEmpty => Error.Validation(description: nameof(MediaContributorIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested media contributor was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaContributorNotFound => Error.NotFound(description: nameof(MediaContributorNotFound));
|
public static Error MediaContributorNotFound => Error.NotFound(description: nameof(MediaContributorNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media contributor already exists.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaContributorAlreadyExists => Error.Conflict(description: nameof(MediaContributorAlreadyExists));
|
public static Error MediaContributorAlreadyExists => Error.Conflict(description: nameof(MediaContributorAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the media contributor role is not a defined value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMediaContributorRole => Error.Validation(description: nameof(UnknownMediaContributorRole));
|
public static Error UnknownMediaContributorRole => Error.Validation(description: nameof(UnknownMediaContributorRole));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,9 +9,19 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report media item contributor name rule violations.
|
||||||
|
/// </summary>
|
||||||
public static class MediaContributors
|
public static class MediaContributors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a media contributor cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaContributorNameCannotBeEmpty => Error.Validation(description: nameof(MediaContributorNameCannotBeEmpty));
|
public static Error MediaContributorNameCannotBeEmpty => Error.Validation(description: nameof(MediaContributorNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the role name of a media contributor cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaContributorRoleNameCannotBeEmpty => Error.Validation(description: nameof(MediaContributorRoleNameCannotBeEmpty));
|
public static Error MediaContributorRoleNameCannotBeEmpty => Error.Validation(description: nameof(MediaContributorRoleNameCannotBeEmpty));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,38 +9,164 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the errors that report failures raised while working with the metadata of media items.
|
||||||
|
/// </summary>
|
||||||
public static class Metadata
|
public static class Metadata
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the metadata of a media item cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error MetadataCannotBeNull => Error.Validation(description: nameof(MetadataCannotBeNull));
|
public static Error MetadataCannotBeNull => Error.Validation(description: nameof(MetadataCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the title of a media item cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error TitleCannotBeEmpty => Error.Validation(description: nameof(TitleCannotBeEmpty));
|
public static Error TitleCannotBeEmpty => Error.Validation(description: nameof(TitleCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the title of a media item exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error TitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(TitleMustBeMaximum255CharactersLong));
|
public static Error TitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(TitleMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the original title of a media item exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error OriginalTitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(OriginalTitleMustBeMaximum255CharactersLong));
|
public static Error OriginalTitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(OriginalTitleMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the description of a media item exceeds the maximum length of 2000 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error DescriptionMustBeMaximum2000CharactersLong => Error.Validation(description: nameof(DescriptionMustBeMaximum2000CharactersLong));
|
public static Error DescriptionMustBeMaximum2000CharactersLong => Error.Validation(description: nameof(DescriptionMustBeMaximum2000CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the collection of genres for a media item cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error GenresListCannotBeNull => Error.Validation(description: nameof(GenresListCannotBeNull));
|
public static Error GenresListCannotBeNull => Error.Validation(description: nameof(GenresListCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a genre cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error GenreNameCannotBeEmpty => Error.Validation(description: nameof(GenreNameCannotBeEmpty));
|
public static Error GenreNameCannotBeEmpty => Error.Validation(description: nameof(GenreNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a genre exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error GenreNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(GenreNameMustBeMaximum50CharactersLong));
|
public static Error GenreNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(GenreNameMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the collection of tags for a media item cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error TagsListCannotBeNull => Error.Validation(description: nameof(TagsListCannotBeNull));
|
public static Error TagsListCannotBeNull => Error.Validation(description: nameof(TagsListCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a tag cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error TagNameCannotBeEmpty => Error.Validation(description: nameof(TagNameCannotBeEmpty));
|
public static Error TagNameCannotBeEmpty => Error.Validation(description: nameof(TagNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a tag exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error TagNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(TagNameMustBeMaximum50CharactersLong));
|
public static Error TagNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(TagNameMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a mood cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MoodNameCannotBeEmpty => Error.Validation(description: nameof(MoodNameCannotBeEmpty));
|
public static Error MoodNameCannotBeEmpty => Error.Validation(description: nameof(MoodNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the code of a language cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error LanguageCodeCannotBeEmpty => Error.Validation(description: nameof(LanguageCodeCannotBeEmpty));
|
public static Error LanguageCodeCannotBeEmpty => Error.Validation(description: nameof(LanguageCodeCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a language cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error LanguageNameCannotBeEmpty => Error.Validation(description: nameof(LanguageNameCannotBeEmpty));
|
public static Error LanguageNameCannotBeEmpty => Error.Validation(description: nameof(LanguageNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the code of a language must be exactly 2 characters long.
|
||||||
|
/// </summary>
|
||||||
public static Error LanguageCodeMustBe2CharactersLong => Error.Validation(description: nameof(LanguageCodeMustBe2CharactersLong));
|
public static Error LanguageCodeMustBe2CharactersLong => Error.Validation(description: nameof(LanguageCodeMustBe2CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a language exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error LanguageNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LanguageNameMustBeMaximum50CharactersLong));
|
public static Error LanguageNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LanguageNameMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the native name of a language exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error LanguageNativeNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LanguageNativeNameMustBeMaximum50CharactersLong));
|
public static Error LanguageNativeNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LanguageNativeNameMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the original release year of a media item is outside the range from 1 to 9999.
|
||||||
|
/// </summary>
|
||||||
public static Error OriginalReleaseYearMustBeBetween1And9999 => Error.Validation(description: nameof(OriginalReleaseYearMustBeBetween1And9999));
|
public static Error OriginalReleaseYearMustBeBetween1And9999 => Error.Validation(description: nameof(OriginalReleaseYearMustBeBetween1And9999));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the re-release year of a media item is outside the range from 1 to 9999.
|
||||||
|
/// </summary>
|
||||||
public static Error ReReleaseYearMustBeBetween1And9999 => Error.Validation(description: nameof(ReReleaseYearMustBeBetween1And9999));
|
public static Error ReReleaseYearMustBeBetween1And9999 => Error.Validation(description: nameof(ReReleaseYearMustBeBetween1And9999));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the re-release year of a media item is earlier than its original release year.
|
||||||
|
/// </summary>
|
||||||
public static Error ReReleaseYearCannotBeEarlierThanOriginalReleaseYear => Error.Validation(description: nameof(ReReleaseYearCannotBeEarlierThanOriginalReleaseYear));
|
public static Error ReReleaseYearCannotBeEarlierThanOriginalReleaseYear => Error.Validation(description: nameof(ReReleaseYearCannotBeEarlierThanOriginalReleaseYear));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the code of a release country must be exactly 2 characters long.
|
||||||
|
/// </summary>
|
||||||
public static Error CountryCodeMustBe2CharactersLong => Error.Validation(description: nameof(CountryCodeMustBe2CharactersLong));
|
public static Error CountryCodeMustBe2CharactersLong => Error.Validation(description: nameof(CountryCodeMustBe2CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the release version of a media item exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error ReleaseVersionMustBeMaximum50CharactersLong => Error.Validation(description: nameof(ReleaseVersionMustBeMaximum50CharactersLong));
|
public static Error ReleaseVersionMustBeMaximum50CharactersLong => Error.Validation(description: nameof(ReleaseVersionMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the original release date and the original release year of a media item refer to different years.
|
||||||
|
/// </summary>
|
||||||
public static Error OriginalReleaseDateAndYearMustMatch => Error.Validation(description: nameof(OriginalReleaseDateAndYearMustMatch));
|
public static Error OriginalReleaseDateAndYearMustMatch => Error.Validation(description: nameof(OriginalReleaseDateAndYearMustMatch));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the re-release date and the re-release year of a media item refer to different years.
|
||||||
|
/// </summary>
|
||||||
public static Error ReReleaseDateAndYearMustMatch => Error.Validation(description: nameof(ReReleaseDateAndYearMustMatch));
|
public static Error ReReleaseDateAndYearMustMatch => Error.Validation(description: nameof(ReReleaseDateAndYearMustMatch));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the re-release date of a media item is earlier than its original release date.
|
||||||
|
/// </summary>
|
||||||
public static Error ReReleaseDateCannotBeEarlierThanOriginalReleaseDate => Error.Validation(description: nameof(ReReleaseDateCannotBeEarlierThanOriginalReleaseDate));
|
public static Error ReReleaseDateCannotBeEarlierThanOriginalReleaseDate => Error.Validation(description: nameof(ReReleaseDateCannotBeEarlierThanOriginalReleaseDate));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the release information of a media item cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ReleaseInfoCannotBeNull => Error.Validation(description: nameof(ReleaseInfoCannotBeNull));
|
public static Error ReleaseInfoCannotBeNull => Error.Validation(description: nameof(ReleaseInfoCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the value or the maximum value of a rating is negative.
|
||||||
|
/// </summary>
|
||||||
public static Error RatingValueMustBePositive => Error.Validation(description: nameof(RatingValueMustBePositive));
|
public static Error RatingValueMustBePositive => Error.Validation(description: nameof(RatingValueMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the maximum value of a rating must be positive.
|
||||||
|
/// </summary>
|
||||||
public static Error RatingMaxValueMustBePositive => Error.Validation(description: nameof(RatingMaxValueMustBePositive));
|
public static Error RatingMaxValueMustBePositive => Error.Validation(description: nameof(RatingMaxValueMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the value of a rating is greater than the maximum value of the same rating.
|
||||||
|
/// </summary>
|
||||||
public static Error RatingValueCannotBeGreaterThanMaxValue => Error.Validation(description: nameof(RatingValueCannotBeGreaterThanMaxValue));
|
public static Error RatingValueCannotBeGreaterThanMaxValue => Error.Validation(description: nameof(RatingValueCannotBeGreaterThanMaxValue));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the vote count of a rating must be positive.
|
||||||
|
/// </summary>
|
||||||
public static Error RatingVoteCountMustBePositive => Error.Validation(description: nameof(RatingVoteCountMustBePositive));
|
public static Error RatingVoteCountMustBePositive => Error.Validation(description: nameof(RatingVoteCountMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the collection of ratings for a media item cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error RatingsListCannotBeNull => Error.Validation(description: nameof(RatingsListCannotBeNull));
|
public static Error RatingsListCannotBeNull => Error.Validation(description: nameof(RatingsListCannotBeNull));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,65 +9,299 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the errors that report failures raised while working with music artists, albums and tracks.
|
||||||
|
/// </summary>
|
||||||
public static class Music
|
public static class Music
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested music artist does not exist.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistNotFound => Error.NotFound(description: nameof(ArtistNotFound));
|
public static Error ArtistNotFound => Error.NotFound(description: nameof(ArtistNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist with the same identifier or name already exists in the library.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistAlreadyExists => Error.Conflict(description: nameof(ArtistAlreadyExists));
|
public static Error ArtistAlreadyExists => Error.Conflict(description: nameof(ArtistAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistIdCannotBeEmpty => Error.Validation(description: nameof(ArtistIdCannotBeEmpty));
|
public static Error ArtistIdCannotBeEmpty => Error.Validation(description: nameof(ArtistIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistNameCannotBeEmpty => Error.Validation(description: nameof(ArtistNameCannotBeEmpty));
|
public static Error ArtistNameCannotBeEmpty => Error.Validation(description: nameof(ArtistNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist name exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(ArtistNameMustBeMaximum255CharactersLong));
|
public static Error ArtistNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(ArtistNameMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist website exceeds the maximum length of 2048 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistWebsiteMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(ArtistWebsiteMustBeMaximum2048CharactersLong));
|
public static Error ArtistWebsiteMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(ArtistWebsiteMustBeMaximum2048CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a MusicBrainz identifier does not have a valid format.
|
||||||
|
/// </summary>
|
||||||
public static Error MusicBrainzIdInvalidFormat => Error.Validation(description: nameof(MusicBrainzIdInvalidFormat));
|
public static Error MusicBrainzIdInvalidFormat => Error.Validation(description: nameof(MusicBrainzIdInvalidFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISRC value cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error IsrcValueCannotBeEmpty => Error.Validation(description: nameof(IsrcValueCannotBeEmpty));
|
public static Error IsrcValueCannotBeEmpty => Error.Validation(description: nameof(IsrcValueCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISRC value does not have a valid ISRC format.
|
||||||
|
/// </summary>
|
||||||
public static Error IsrcInvalidFormat => Error.Validation(description: nameof(IsrcInvalidFormat));
|
public static Error IsrcInvalidFormat => Error.Validation(description: nameof(IsrcInvalidFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a barcode value cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error BarcodeValueCannotBeEmpty => Error.Validation(description: nameof(BarcodeValueCannotBeEmpty));
|
public static Error BarcodeValueCannotBeEmpty => Error.Validation(description: nameof(BarcodeValueCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a barcode is not made of 12 or 13 digits.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidFormatForBarcode => Error.Validation(description: nameof(InvalidFormatForBarcode));
|
public static Error InvalidFormatForBarcode => Error.Validation(description: nameof(InvalidFormatForBarcode));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested music album does not exist.
|
||||||
|
/// </summary>
|
||||||
public static Error AlbumNotFound => Error.NotFound(description: nameof(AlbumNotFound));
|
public static Error AlbumNotFound => Error.NotFound(description: nameof(AlbumNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music album with the same identifier already exists in the library.
|
||||||
|
/// </summary>
|
||||||
public static Error AlbumAlreadyExists => Error.Conflict(description: nameof(AlbumAlreadyExists));
|
public static Error AlbumAlreadyExists => Error.Conflict(description: nameof(AlbumAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist cannot exist without at least one album.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistMustHaveAtLeastOneAlbum => Error.Forbidden(description: nameof(ArtistMustHaveAtLeastOneAlbum));
|
public static Error ArtistMustHaveAtLeastOneAlbum => Error.Forbidden(description: nameof(ArtistMustHaveAtLeastOneAlbum));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music album identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error AlbumIdCannotBeEmpty => Error.Validation(description: nameof(AlbumIdCannotBeEmpty));
|
public static Error AlbumIdCannotBeEmpty => Error.Validation(description: nameof(AlbumIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the collection of albums for a music artist cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error AlbumsListCannotBeNull => Error.Validation(description: nameof(AlbumsListCannotBeNull));
|
public static Error AlbumsListCannotBeNull => Error.Validation(description: nameof(AlbumsListCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music album title cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error AlbumTitleCannotBeEmpty => Error.Validation(description: nameof(AlbumTitleCannotBeEmpty));
|
public static Error AlbumTitleCannotBeEmpty => Error.Validation(description: nameof(AlbumTitleCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music album title exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error AlbumTitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(AlbumTitleMustBeMaximum255CharactersLong));
|
public static Error AlbumTitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(AlbumTitleMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the total number of discs in a music album must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error TotalDiscsMustBeGreaterThanZero => Error.Validation(description: nameof(TotalDiscsMustBeGreaterThanZero));
|
public static Error TotalDiscsMustBeGreaterThanZero => Error.Validation(description: nameof(TotalDiscsMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the total number of tracks in a music album must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error TotalTracksMustBeGreaterThanZero => Error.Validation(description: nameof(TotalTracksMustBeGreaterThanZero));
|
public static Error TotalTracksMustBeGreaterThanZero => Error.Validation(description: nameof(TotalTracksMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music release type is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMusicReleaseType => Error.Validation(description: nameof(UnknownMusicReleaseType));
|
public static Error UnknownMusicReleaseType => Error.Validation(description: nameof(UnknownMusicReleaseType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music release status is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMusicReleaseStatus => Error.Validation(description: nameof(UnknownMusicReleaseStatus));
|
public static Error UnknownMusicReleaseStatus => Error.Validation(description: nameof(UnknownMusicReleaseStatus));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music media format is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMusicMediaFormat => Error.Validation(description: nameof(UnknownMusicMediaFormat));
|
public static Error UnknownMusicMediaFormat => Error.Validation(description: nameof(UnknownMusicMediaFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music release packaging is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMusicReleasePackaging => Error.Validation(description: nameof(UnknownMusicReleasePackaging));
|
public static Error UnknownMusicReleasePackaging => Error.Validation(description: nameof(UnknownMusicReleasePackaging));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music key is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMusicKey => Error.Validation(description: nameof(UnknownMusicKey));
|
public static Error UnknownMusicKey => Error.Validation(description: nameof(UnknownMusicKey));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music album catalog number exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error CatalogNumberMustBeMaximum50CharactersLong => Error.Validation(description: nameof(CatalogNumberMustBeMaximum50CharactersLong));
|
public static Error CatalogNumberMustBeMaximum50CharactersLong => Error.Validation(description: nameof(CatalogNumberMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested music track does not exist.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackNotFound => Error.NotFound(description: nameof(TrackNotFound));
|
public static Error TrackNotFound => Error.NotFound(description: nameof(TrackNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the audio file of a music track does not exist or cannot be read.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackFileNotFound => Error.NotFound(description: nameof(TrackFileNotFound));
|
public static Error TrackFileNotFound => Error.NotFound(description: nameof(TrackFileNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music track with the same identifier or file path already exists in the library.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackAlreadyExists => Error.Conflict(description: nameof(TrackAlreadyExists));
|
public static Error TrackAlreadyExists => Error.Conflict(description: nameof(TrackAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music track identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackIdCannotBeEmpty => Error.Validation(description: nameof(TrackIdCannotBeEmpty));
|
public static Error TrackIdCannotBeEmpty => Error.Validation(description: nameof(TrackIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the collection of tracks for a music album cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error TracksListCannotBeNull => Error.Validation(description: nameof(TracksListCannotBeNull));
|
public static Error TracksListCannotBeNull => Error.Validation(description: nameof(TracksListCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music track file path cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackPathCannotBeEmpty => Error.Validation(description: nameof(TrackPathCannotBeEmpty));
|
public static Error TrackPathCannotBeEmpty => Error.Validation(description: nameof(TrackPathCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music track file path exceeds the maximum length of 2048 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackPathMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(TrackPathMustBeMaximum2048CharactersLong));
|
public static Error TrackPathMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(TrackPathMustBeMaximum2048CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music track file path does not reside within any of the content locations of the library.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackPathMustBeWithinLibraryContentLocations => Error.Validation(description: nameof(TrackPathMustBeWithinLibraryContentLocations));
|
public static Error TrackPathMustBeWithinLibraryContentLocations => Error.Validation(description: nameof(TrackPathMustBeWithinLibraryContentLocations));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the number of a music track must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackNumberMustBeGreaterThanZero => Error.Validation(description: nameof(TrackNumberMustBeGreaterThanZero));
|
public static Error TrackNumberMustBeGreaterThanZero => Error.Validation(description: nameof(TrackNumberMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the disc number of a music track must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error DiscNumberMustBeGreaterThanZero => Error.Validation(description: nameof(DiscNumberMustBeGreaterThanZero));
|
public static Error DiscNumberMustBeGreaterThanZero => Error.Validation(description: nameof(DiscNumberMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music script exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error ScriptMustBeMaximum50CharactersLong => Error.Validation(description: nameof(ScriptMustBeMaximum50CharactersLong));
|
public static Error ScriptMustBeMaximum50CharactersLong => Error.Validation(description: nameof(ScriptMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the title of a music work exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error WorkMustBeMaximum255CharactersLong => Error.Validation(description: nameof(WorkMustBeMaximum255CharactersLong));
|
public static Error WorkMustBeMaximum255CharactersLong => Error.Validation(description: nameof(WorkMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the beats per minute value of a music track must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error BpmMustBeGreaterThanZero => Error.Validation(description: nameof(BpmMustBeGreaterThanZero));
|
public static Error BpmMustBeGreaterThanZero => Error.Validation(description: nameof(BpmMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the album cannot be added to the music artist because the artist already has it.
|
||||||
|
/// </summary>
|
||||||
public static Error TheArtistAlreadyHasTheAlbum => Error.Forbidden(description: nameof(TheArtistAlreadyHasTheAlbum));
|
public static Error TheArtistAlreadyHasTheAlbum => Error.Forbidden(description: nameof(TheArtistAlreadyHasTheAlbum));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the album cannot be removed from the music artist because the artist does not have it.
|
||||||
|
/// </summary>
|
||||||
public static Error TheArtistDoesNotHaveTheAlbum => Error.Forbidden(description: nameof(TheArtistDoesNotHaveTheAlbum));
|
public static Error TheArtistDoesNotHaveTheAlbum => Error.Forbidden(description: nameof(TheArtistDoesNotHaveTheAlbum));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the track cannot be added to the music album because the album already contains it.
|
||||||
|
/// </summary>
|
||||||
public static Error TheTrackIsAlreadyInTheAlbum => Error.Forbidden(description: nameof(TheTrackIsAlreadyInTheAlbum));
|
public static Error TheTrackIsAlreadyInTheAlbum => Error.Forbidden(description: nameof(TheTrackIsAlreadyInTheAlbum));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the track cannot be removed from the music album because the album does not contain it.
|
||||||
|
/// </summary>
|
||||||
public static Error TheTrackIsNotInTheAlbum => Error.Forbidden(description: nameof(TheTrackIsNotInTheAlbum));
|
public static Error TheTrackIsNotInTheAlbum => Error.Forbidden(description: nameof(TheTrackIsNotInTheAlbum));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a music area cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error AreaNameCannotBeEmpty => Error.Validation(description: nameof(AreaNameCannotBeEmpty));
|
public static Error AreaNameCannotBeEmpty => Error.Validation(description: nameof(AreaNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a music artist alias cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistAliasNameCannotBeEmpty => Error.Validation(description: nameof(ArtistAliasNameCannotBeEmpty));
|
public static Error ArtistAliasNameCannotBeEmpty => Error.Validation(description: nameof(ArtistAliasNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a music artist alias exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error ArtistAliasNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(ArtistAliasNameMustBeMaximum255CharactersLong));
|
public static Error ArtistAliasNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(ArtistAliasNameMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the name of a music area exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error AreaNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(AreaNameMustBeMaximum255CharactersLong));
|
public static Error AreaNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(AreaNameMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist type is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMusicArtistType => Error.Validation(description: nameof(UnknownMusicArtistType));
|
public static Error UnknownMusicArtistType => Error.Validation(description: nameof(UnknownMusicArtistType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist gender is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownMusicArtistGender => Error.Validation(description: nameof(UnknownMusicArtistGender));
|
public static Error UnknownMusicArtistGender => Error.Validation(description: nameof(UnknownMusicArtistGender));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a music artist country exceeds the maximum length of 2 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error CountryMustBeMaximum2CharactersLong => Error.Validation(description: nameof(CountryMustBeMaximum2CharactersLong));
|
public static Error CountryMustBeMaximum2CharactersLong => Error.Validation(description: nameof(CountryMustBeMaximum2CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an IPI value cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error IpiValueCannotBeEmpty => Error.Validation(description: nameof(IpiValueCannotBeEmpty));
|
public static Error IpiValueCannotBeEmpty => Error.Validation(description: nameof(IpiValueCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an IPI value exceeds the maximum length of 20 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error IpiValueMustBeMaximum20CharactersLong => Error.Validation(description: nameof(IpiValueMustBeMaximum20CharactersLong));
|
public static Error IpiValueMustBeMaximum20CharactersLong => Error.Validation(description: nameof(IpiValueMustBeMaximum20CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISNI value cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error IsniValueCannotBeEmpty => Error.Validation(description: nameof(IsniValueCannotBeEmpty));
|
public static Error IsniValueCannotBeEmpty => Error.Validation(description: nameof(IsniValueCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISNI value exceeds the maximum length of 20 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error IsniValueMustBeMaximum20CharactersLong => Error.Validation(description: nameof(IsniValueMustBeMaximum20CharactersLong));
|
public static Error IsniValueMustBeMaximum20CharactersLong => Error.Validation(description: nameof(IsniValueMustBeMaximum20CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the title of a music work cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error WorkTitleCannotBeEmpty => Error.Validation(description: nameof(WorkTitleCannotBeEmpty));
|
public static Error WorkTitleCannotBeEmpty => Error.Validation(description: nameof(WorkTitleCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the cover image of a music artist or album cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error CoverCannotBeNull => Error.Validation(description: nameof(CoverCannotBeNull));
|
public static Error CoverCannotBeNull => Error.Validation(description: nameof(CoverCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the number of tracks requested for shuffling must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error ShuffleTrackCountMustBeGreaterThanZero => Error.Validation(description: nameof(ShuffleTrackCountMustBeGreaterThanZero));
|
public static Error ShuffleTrackCountMustBeGreaterThanZero => Error.Validation(description: nameof(ShuffleTrackCountMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the number of tracks requested for shuffling cannot exceed 500.
|
||||||
|
/// </summary>
|
||||||
public static Error ShuffleTrackCountMustBeAtMost500 => Error.Validation(description: nameof(ShuffleTrackCountMustBeAtMost500));
|
public static Error ShuffleTrackCountMustBeAtMost500 => Error.Validation(description: nameof(ShuffleTrackCountMustBeAtMost500));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,8 +9,14 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report denied access to file system resources.
|
||||||
|
/// </summary>
|
||||||
public static class Permission
|
public static class Permission
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the current user is not authorized to access the requested resource.
|
||||||
|
/// </summary>
|
||||||
public static Error UnauthorizedAccess => Error.Failure(description: nameof(UnauthorizedAccess));
|
public static Error UnauthorizedAccess => Error.Failure(description: nameof(UnauthorizedAccess));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,24 +9,94 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report playback delivery and track normalization failures.
|
||||||
|
/// </summary>
|
||||||
public static class Playback
|
public static class Playback
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that no supported playback format is available for the requested track.
|
||||||
|
/// </summary>
|
||||||
public static Error NoSupportedPlaybackFormat => Error.Forbidden(description: nameof(NoSupportedPlaybackFormat));
|
public static Error NoSupportedPlaybackFormat => Error.Forbidden(description: nameof(NoSupportedPlaybackFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playback delivery changed before it could be used.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaybackDeliveryChanged => Error.Conflict(description: nameof(PlaybackDeliveryChanged));
|
public static Error PlaybackDeliveryChanged => Error.Conflict(description: nameof(PlaybackDeliveryChanged));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested playback delivery was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaybackDeliveryNotFound => Error.NotFound(description: nameof(PlaybackDeliveryNotFound));
|
public static Error PlaybackDeliveryNotFound => Error.NotFound(description: nameof(PlaybackDeliveryNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playback delivery identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error DeliveryIdCannotBeEmpty => Error.Validation(description: nameof(DeliveryIdCannotBeEmpty));
|
public static Error DeliveryIdCannotBeEmpty => Error.Validation(description: nameof(DeliveryIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playback delivery identifier is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error DeliveryIdIsInvalid => Error.Validation(description: nameof(DeliveryIdIsInvalid));
|
public static Error DeliveryIdIsInvalid => Error.Validation(description: nameof(DeliveryIdIsInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playback format has no implementation.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaybackFormatNotImplemented => Error.Internal(description: nameof(PlaybackFormatNotImplemented));
|
public static Error PlaybackFormatNotImplemented => Error.Internal(description: nameof(PlaybackFormatNotImplemented));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the normalized track cache entry was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error NormalizedTrackCacheEntryNotFound => Error.NotFound(description: nameof(NormalizedTrackCacheEntryNotFound));
|
public static Error NormalizedTrackCacheEntryNotFound => Error.NotFound(description: nameof(NormalizedTrackCacheEntryNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the normalized track segment was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error NormalizedTrackSegmentNotFound => Error.NotFound(description: nameof(NormalizedTrackSegmentNotFound));
|
public static Error NormalizedTrackSegmentNotFound => Error.NotFound(description: nameof(NormalizedTrackSegmentNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the track normalization failed.
|
||||||
|
/// </summary>
|
||||||
public static Error NormalizationFailed => Error.Failure(description: nameof(NormalizationFailed));
|
public static Error NormalizationFailed => Error.Failure(description: nameof(NormalizationFailed));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the normalized track cache limit was exceeded.
|
||||||
|
/// </summary>
|
||||||
public static Error NormalizationCacheLimitExceeded => Error.Failure(description: nameof(NormalizationCacheLimitExceeded));
|
public static Error NormalizationCacheLimitExceeded => Error.Failure(description: nameof(NormalizationCacheLimitExceeded));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the track normalization timed out.
|
||||||
|
/// </summary>
|
||||||
public static Error NormalizationTimedOut => Error.Timeout(description: nameof(NormalizationTimedOut));
|
public static Error NormalizationTimedOut => Error.Timeout(description: nameof(NormalizationTimedOut));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the track normalization is unavailable because a required resource cannot be used.
|
||||||
|
/// </summary>
|
||||||
public static Error NormalizationUnavailable => Error.ResourceUnavailable(description: nameof(NormalizationUnavailable));
|
public static Error NormalizationUnavailable => Error.ResourceUnavailable(description: nameof(NormalizationUnavailable));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that normalization is not required for a directly played track.
|
||||||
|
/// </summary>
|
||||||
public static Error NormalizationIsNotRequiredForDirectPlay => Error.Conflict(description: nameof(NormalizationIsNotRequiredForDirectPlay));
|
public static Error NormalizationIsNotRequiredForDirectPlay => Error.Conflict(description: nameof(NormalizationIsNotRequiredForDirectPlay));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the segment duration must be a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error SegmentDurationMustBePositive => Error.Validation(description: nameof(SegmentDurationMustBePositive));
|
public static Error SegmentDurationMustBePositive => Error.Validation(description: nameof(SegmentDurationMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the segment index cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error SegmentIndexCannotBeEmpty => Error.Validation(description: nameof(SegmentIndexCannotBeEmpty));
|
public static Error SegmentIndexCannotBeEmpty => Error.Validation(description: nameof(SegmentIndexCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the segment index is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error SegmentIndexMustBeValid => Error.Validation(description: nameof(SegmentIndexMustBeValid));
|
public static Error SegmentIndexMustBeValid => Error.Validation(description: nameof(SegmentIndexMustBeValid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the track duration must be a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error TrackDurationMustBePositive => Error.Validation(description: nameof(TrackDurationMustBePositive));
|
public static Error TrackDurationMustBePositive => Error.Validation(description: nameof(TrackDurationMustBePositive));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,19 +9,69 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report playlist rule violations and missing playlists.
|
||||||
|
/// </summary>
|
||||||
public static class Playlists
|
public static class Playlists
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested playlist was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistNotFound => Error.NotFound(description: nameof(PlaylistNotFound));
|
public static Error PlaylistNotFound => Error.NotFound(description: nameof(PlaylistNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a playlist with the same identifier already exists.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistAlreadyExists => Error.Conflict(description: nameof(PlaylistAlreadyExists));
|
public static Error PlaylistAlreadyExists => Error.Conflict(description: nameof(PlaylistAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playlist identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistIdCannotBeEmpty => Error.Validation(description: nameof(PlaylistIdCannotBeEmpty));
|
public static Error PlaylistIdCannotBeEmpty => Error.Validation(description: nameof(PlaylistIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playlist entry identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistEntryIdCannotBeEmpty => Error.Validation(description: nameof(PlaylistEntryIdCannotBeEmpty));
|
public static Error PlaylistEntryIdCannotBeEmpty => Error.Validation(description: nameof(PlaylistEntryIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playlist name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistNameCannotBeEmpty => Error.Validation(description: nameof(PlaylistNameCannotBeEmpty));
|
public static Error PlaylistNameCannotBeEmpty => Error.Validation(description: nameof(PlaylistNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playlist name exceeds the maximum length of 255 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(PlaylistNameMustBeMaximum255CharactersLong));
|
public static Error PlaylistNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(PlaylistNameMustBeMaximum255CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playlist description exceeds the maximum length of 2000 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistDescriptionMustBeMaximum2000CharactersLong => Error.Validation(description: nameof(PlaylistDescriptionMustBeMaximum2000CharactersLong));
|
public static Error PlaylistDescriptionMustBeMaximum2000CharactersLong => Error.Validation(description: nameof(PlaylistDescriptionMustBeMaximum2000CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playlist type is not a defined value.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistTypeIsInvalid => Error.Validation(description: nameof(PlaylistTypeIsInvalid));
|
public static Error PlaylistTypeIsInvalid => Error.Validation(description: nameof(PlaylistTypeIsInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playlist type does not accept media items.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistDoesNotAcceptMediaItems => Error.Forbidden(description: nameof(PlaylistDoesNotAcceptMediaItems));
|
public static Error PlaylistDoesNotAcceptMediaItems => Error.Forbidden(description: nameof(PlaylistDoesNotAcceptMediaItems));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested playlist entry was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistEntryNotFound => Error.NotFound(description: nameof(PlaylistEntryNotFound));
|
public static Error PlaylistEntryNotFound => Error.NotFound(description: nameof(PlaylistEntryNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the positions of the playlist entries are not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistEntryPositionsAreInvalid => Error.Validation(description: nameof(PlaylistEntryPositionsAreInvalid));
|
public static Error PlaylistEntryPositionsAreInvalid => Error.Validation(description: nameof(PlaylistEntryPositionsAreInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the target position of the playlist entry move is not valid.
|
||||||
|
/// </summary>
|
||||||
public static Error PlaylistMoveTargetPositionIsInvalid => Error.Validation(description: nameof(PlaylistMoveTargetPositionIsInvalid));
|
public static Error PlaylistMoveTargetPositionIsInvalid => Error.Validation(description: nameof(PlaylistMoveTargetPositionIsInvalid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,19 +9,69 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report plugin rule violations and plugin loading failures.
|
||||||
|
/// </summary>
|
||||||
public static class Plugins
|
public static class Plugins
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested plugin was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginNotFound => Error.NotFound(description: nameof(PluginNotFound));
|
public static Error PluginNotFound => Error.NotFound(description: nameof(PluginNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginIdCannotBeEmpty => Error.Validation(description: nameof(PluginIdCannotBeEmpty));
|
public static Error PluginIdCannotBeEmpty => Error.Validation(description: nameof(PluginIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin settings must not be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginSettingsCannotBeNull => Error.Validation(description: nameof(PluginSettingsCannotBeNull));
|
public static Error PluginSettingsCannotBeNull => Error.Validation(description: nameof(PluginSettingsCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the library identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryIdCannotBeEmpty => Error.Validation(description: nameof(LibraryIdCannotBeEmpty));
|
public static Error LibraryIdCannotBeEmpty => Error.Validation(description: nameof(LibraryIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin identifiers must be unique.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginIdsMustBeUnique => Error.Validation(description: nameof(PluginIdsMustBeUnique));
|
public static Error PluginIdsMustBeUnique => Error.Validation(description: nameof(PluginIdsMustBeUnique));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin is not supported for the library type.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginNotSupportedForLibraryType => Error.Validation(description: nameof(PluginNotSupportedForLibraryType));
|
public static Error PluginNotSupportedForLibraryType => Error.Validation(description: nameof(PluginNotSupportedForLibraryType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the metadata provider configuration of the library was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryMetadataProviderConfigurationNotFound => Error.NotFound(description: nameof(LibraryMetadataProviderConfigurationNotFound));
|
public static Error LibraryMetadataProviderConfigurationNotFound => Error.NotFound(description: nameof(LibraryMetadataProviderConfigurationNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin archive must not be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginArchiveCannotBeNull => Error.Validation(description: nameof(PluginArchiveCannotBeNull));
|
public static Error PluginArchiveCannotBeNull => Error.Validation(description: nameof(PluginArchiveCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin file name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginFileNameCannotBeEmpty => Error.Validation(description: nameof(PluginFileNameCannotBeEmpty));
|
public static Error PluginFileNameCannotBeEmpty => Error.Validation(description: nameof(PluginFileNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin file type is not supported.
|
||||||
|
/// </summary>
|
||||||
public static Error UnsupportedPluginFileType => Error.Validation(description: nameof(UnsupportedPluginFileType));
|
public static Error UnsupportedPluginFileType => Error.Validation(description: nameof(UnsupportedPluginFileType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin archive could not be read.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginArchiveNotReadable => Error.Failure(description: nameof(PluginArchiveNotReadable));
|
public static Error PluginArchiveNotReadable => Error.Failure(description: nameof(PluginArchiveNotReadable));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the plugin archive contains no assemblies.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginArchiveContainsNoAssemblies => Error.Failure(description: nameof(PluginArchiveContainsNoAssemblies));
|
public static Error PluginArchiveContainsNoAssemblies => Error.Failure(description: nameof(PluginArchiveContainsNoAssemblies));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,15 +9,49 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report reading rule violations and missing reading resources.
|
||||||
|
/// </summary>
|
||||||
public static class Reading
|
public static class Reading
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the reading location reference cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error LocationRefCannotBeEmpty => Error.Validation(description: nameof(LocationRefCannotBeEmpty));
|
public static Error LocationRefCannotBeEmpty => Error.Validation(description: nameof(LocationRefCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the reading resource key cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ResourceKeyCannotBeEmpty => Error.Validation(description: nameof(ResourceKeyCannotBeEmpty));
|
public static Error ResourceKeyCannotBeEmpty => Error.Validation(description: nameof(ResourceKeyCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested book was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error BookNotFound => Error.NotFound(description: nameof(BookNotFound));
|
public static Error BookNotFound => Error.NotFound(description: nameof(BookNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that no book reader is available.
|
||||||
|
/// </summary>
|
||||||
public static Error NoReaderAvailable => Error.NotFound(description: nameof(NoReaderAvailable));
|
public static Error NoReaderAvailable => Error.NotFound(description: nameof(NoReaderAvailable));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested book reader was not found because it is disabled.
|
||||||
|
/// </summary>
|
||||||
public static Error ReaderDisabled => Error.NotFound(description: nameof(ReaderDisabled));
|
public static Error ReaderDisabled => Error.NotFound(description: nameof(ReaderDisabled));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file of the requested book was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error BookFileNotFound => Error.NotFound(description: nameof(BookFileNotFound));
|
public static Error BookFileNotFound => Error.NotFound(description: nameof(BookFileNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested book section was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error SectionNotFound => Error.NotFound(description: nameof(SectionNotFound));
|
public static Error SectionNotFound => Error.NotFound(description: nameof(SectionNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested reading resource was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error ResourceNotFound => Error.NotFound(description: nameof(ResourceNotFound));
|
public static Error ResourceNotFound => Error.NotFound(description: nameof(ResourceNotFound));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,21 +9,79 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report scheduled job rule violations and scheduling conflicts.
|
||||||
|
/// </summary>
|
||||||
public static class Scheduling
|
public static class Scheduling
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the scheduled job name cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobNameCannotBeEmpty => Error.Validation(description: nameof(ScheduledJobNameCannotBeEmpty));
|
public static Error ScheduledJobNameCannotBeEmpty => Error.Validation(description: nameof(ScheduledJobNameCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the interval in minutes must be a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error IntervalMinutesMustBePositive => Error.Validation(description: nameof(IntervalMinutesMustBePositive));
|
public static Error IntervalMinutesMustBePositive => Error.Validation(description: nameof(IntervalMinutesMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the hour must be between 0 and 23.
|
||||||
|
/// </summary>
|
||||||
public static Error HourMustBeBetweenZeroAndTwentyThree => Error.Validation(description: nameof(HourMustBeBetweenZeroAndTwentyThree));
|
public static Error HourMustBeBetweenZeroAndTwentyThree => Error.Validation(description: nameof(HourMustBeBetweenZeroAndTwentyThree));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the minute must be between 0 and 59.
|
||||||
|
/// </summary>
|
||||||
public static Error MinuteMustBeBetweenZeroAndFiftyNine => Error.Validation(description: nameof(MinuteMustBeBetweenZeroAndFiftyNine));
|
public static Error MinuteMustBeBetweenZeroAndFiftyNine => Error.Validation(description: nameof(MinuteMustBeBetweenZeroAndFiftyNine));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the scheduled job already exists.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobAlreadyExists => Error.Conflict(description: nameof(ScheduledJobAlreadyExists));
|
public static Error ScheduledJobAlreadyExists => Error.Conflict(description: nameof(ScheduledJobAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested scheduled job was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobNotFound => Error.NotFound(description: nameof(ScheduledJobNotFound));
|
public static Error ScheduledJobNotFound => Error.NotFound(description: nameof(ScheduledJobNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the scheduled job execution already exists.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobExecutionAlreadyExists => Error.Conflict(description: nameof(ScheduledJobExecutionAlreadyExists));
|
public static Error ScheduledJobExecutionAlreadyExists => Error.Conflict(description: nameof(ScheduledJobExecutionAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested scheduled job execution was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobExecutionNotFound => Error.NotFound(description: nameof(ScheduledJobExecutionNotFound));
|
public static Error ScheduledJobExecutionNotFound => Error.NotFound(description: nameof(ScheduledJobExecutionNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the cycle of the scheduled job was already started.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobCycleAlreadyStarted => Error.Forbidden(description: nameof(ScheduledJobCycleAlreadyStarted));
|
public static Error ScheduledJobCycleAlreadyStarted => Error.Forbidden(description: nameof(ScheduledJobCycleAlreadyStarted));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the cycle of the scheduled job was not started.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobNotStarted => Error.Forbidden(description: nameof(ScheduledJobNotStarted));
|
public static Error ScheduledJobNotStarted => Error.Forbidden(description: nameof(ScheduledJobNotStarted));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the scheduled job is already running.
|
||||||
|
/// </summary>
|
||||||
public static Error ScheduledJobAlreadyRunning => Error.Forbidden(description: nameof(ScheduledJobAlreadyRunning));
|
public static Error ScheduledJobAlreadyRunning => Error.Forbidden(description: nameof(ScheduledJobAlreadyRunning));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that only a running scheduled job can be completed.
|
||||||
|
/// </summary>
|
||||||
public static Error CanOnlyCompleteRunningScheduledJob => Error.Forbidden(description: nameof(CanOnlyCompleteRunningScheduledJob));
|
public static Error CanOnlyCompleteRunningScheduledJob => Error.Forbidden(description: nameof(CanOnlyCompleteRunningScheduledJob));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the schedule type is not a defined value.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidScheduleType => Error.Validation(description: nameof(InvalidScheduleType));
|
public static Error InvalidScheduleType => Error.Validation(description: nameof(InvalidScheduleType));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the scheduler display time span must be a positive value.
|
||||||
|
/// </summary>
|
||||||
public static Error SchedulerDisplayTimeSpanMustBePositive => Error.Validation(description: nameof(SchedulerDisplayTimeSpanMustBePositive));
|
public static Error SchedulerDisplayTimeSpanMustBePositive => Error.Validation(description: nameof(SchedulerDisplayTimeSpanMustBePositive));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,19 +9,69 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report theme rule violations and theme file failures.
|
||||||
|
/// </summary>
|
||||||
public static class Themes
|
public static class Themes
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested theme was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeNotFound => Error.NotFound(description: nameof(ThemeNotFound));
|
public static Error ThemeNotFound => Error.NotFound(description: nameof(ThemeNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeIdCannotBeEmpty => Error.Validation(description: nameof(ThemeIdCannotBeEmpty));
|
public static Error ThemeIdCannotBeEmpty => Error.Validation(description: nameof(ThemeIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme page key cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PageKeyCannotBeEmpty => Error.Validation(description: nameof(PageKeyCannotBeEmpty));
|
public static Error PageKeyCannotBeEmpty => Error.Validation(description: nameof(PageKeyCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme asset path cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeAssetPathCannotBeEmpty => Error.Validation(description: nameof(ThemeAssetPathCannotBeEmpty));
|
public static Error ThemeAssetPathCannotBeEmpty => Error.Validation(description: nameof(ThemeAssetPathCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme archive must not be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeArchiveCannotBeNull => Error.Validation(description: nameof(ThemeArchiveCannotBeNull));
|
public static Error ThemeArchiveCannotBeNull => Error.Validation(description: nameof(ThemeArchiveCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the last bundled theme cannot be deleted.
|
||||||
|
/// </summary>
|
||||||
public static Error LastBundledThemeCannotBeDeleted => Error.Forbidden(description: nameof(LastBundledThemeCannotBeDeleted));
|
public static Error LastBundledThemeCannotBeDeleted => Error.Forbidden(description: nameof(LastBundledThemeCannotBeDeleted));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme cannot be deleted.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeCannotBeDeleted => Error.Forbidden(description: nameof(ThemeCannotBeDeleted));
|
public static Error ThemeCannotBeDeleted => Error.Forbidden(description: nameof(ThemeCannotBeDeleted));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme cannot be restored.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeCannotBeRestored => Error.Forbidden(description: nameof(ThemeCannotBeRestored));
|
public static Error ThemeCannotBeRestored => Error.Forbidden(description: nameof(ThemeCannotBeRestored));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme archive could not be read.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeArchiveNotReadable => Error.Failure(description: nameof(ThemeArchiveNotReadable));
|
public static Error ThemeArchiveNotReadable => Error.Failure(description: nameof(ThemeArchiveNotReadable));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the files of the theme could not be read.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeFilesUnreadable => Error.Failure(description: nameof(ThemeFilesUnreadable));
|
public static Error ThemeFilesUnreadable => Error.Failure(description: nameof(ThemeFilesUnreadable));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested theme template was not found.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeTemplateNotFound => Error.NotFound(description: nameof(ThemeTemplateNotFound));
|
public static Error ThemeTemplateNotFound => Error.NotFound(description: nameof(ThemeTemplateNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the theme is not available for the requested page.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeNotAvailable => Error.Failure(description: nameof(ThemeNotAvailable));
|
public static Error ThemeNotAvailable => Error.Failure(description: nameof(ThemeNotAvailable));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,9 +9,19 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report thumbnail generation failures and image quality rule violations.
|
||||||
|
/// </summary>
|
||||||
public static class Thumbnails
|
public static class Thumbnails
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that no thumbnail is available for the requested media item.
|
||||||
|
/// </summary>
|
||||||
public static Error NoThumbnail => Error.Failure(description: nameof(NoThumbnail));
|
public static Error NoThumbnail => Error.Failure(description: nameof(NoThumbnail));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the image quality must be between 0 and 100.
|
||||||
|
/// </summary>
|
||||||
public static Error ImageQualityMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(ImageQualityMustBeBetweenZeroAndOneHundred));
|
public static Error ImageQualityMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(ImageQualityMustBeBetweenZeroAndOneHundred));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,38 +9,164 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the errors that report failures raised while working with user settings.
|
||||||
|
/// </summary>
|
||||||
public static class UserSettings
|
public static class UserSettings
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that settings already exist for the user.
|
||||||
|
/// </summary>
|
||||||
public static Error UserSettingsAlreadyExists => Error.Conflict(description: nameof(UserSettingsAlreadyExists));
|
public static Error UserSettingsAlreadyExists => Error.Conflict(description: nameof(UserSettingsAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that no settings exist for the requested user.
|
||||||
|
/// </summary>
|
||||||
public static Error UserSettingsNotFound => Error.NotFound(description: nameof(UserSettingsNotFound));
|
public static Error UserSettingsNotFound => Error.NotFound(description: nameof(UserSettingsNotFound));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the number of items shown per page must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error ItemsPerPageMustBeGreaterThanZero => Error.Validation(description: nameof(ItemsPerPageMustBeGreaterThanZero));
|
public static Error ItemsPerPageMustBeGreaterThanZero => Error.Validation(description: nameof(ItemsPerPageMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playback volume cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VolumeCannotBeNull => Error.Validation(description: nameof(VolumeCannotBeNull));
|
public static Error VolumeCannotBeNull => Error.Validation(description: nameof(VolumeCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the playback volume must be between 0 and 1, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VolumeMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VolumeMustBeBetweenZeroAndOne));
|
public static Error VolumeMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VolumeMustBeBetweenZeroAndOne));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the mute state cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error IsMutedCannotBeNull => Error.Validation(description: nameof(IsMutedCannotBeNull));
|
public static Error IsMutedCannotBeNull => Error.Validation(description: nameof(IsMutedCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the option to keep downloading while playback is paused cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ShouldKeepDownloadingWhilePausedCannotBeNull => Error.Validation(description: nameof(ShouldKeepDownloadingWhilePausedCannotBeNull));
|
public static Error ShouldKeepDownloadingWhilePausedCannotBeNull => Error.Validation(description: nameof(ShouldKeepDownloadingWhilePausedCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the autoplay option cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ShouldAutoplayCannotBeNull => Error.Validation(description: nameof(ShouldAutoplayCannotBeNull));
|
public static Error ShouldAutoplayCannotBeNull => Error.Validation(description: nameof(ShouldAutoplayCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the gapless playback option cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error IsGaplessPlaybackEnabledCannotBeNull => Error.Validation(description: nameof(IsGaplessPlaybackEnabledCannotBeNull));
|
public static Error IsGaplessPlaybackEnabledCannotBeNull => Error.Validation(description: nameof(IsGaplessPlaybackEnabledCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the replay gain mode cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error ReplayGainModeCannotBeNull => Error.Validation(description: nameof(ReplayGainModeCannotBeNull));
|
public static Error ReplayGainModeCannotBeNull => Error.Validation(description: nameof(ReplayGainModeCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the streaming quality cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error StreamingQualityCannotBeNull => Error.Validation(description: nameof(StreamingQualityCannotBeNull));
|
public static Error StreamingQualityCannotBeNull => Error.Validation(description: nameof(StreamingQualityCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the replay gain mode is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidReplayGainMode => Error.Validation(description: nameof(InvalidReplayGainMode));
|
public static Error InvalidReplayGainMode => Error.Validation(description: nameof(InvalidReplayGainMode));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the streaming quality is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidStreamingQuality => Error.Validation(description: nameof(InvalidStreamingQuality));
|
public static Error InvalidStreamingQuality => Error.Validation(description: nameof(InvalidStreamingQuality));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter orientation cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterOrientationCannotBeNull => Error.Validation(description: nameof(VuMeterOrientationCannotBeNull));
|
public static Error VuMeterOrientationCannotBeNull => Error.Validation(description: nameof(VuMeterOrientationCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter orientation is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidVuMeterOrientation => Error.Validation(description: nameof(InvalidVuMeterOrientation));
|
public static Error InvalidVuMeterOrientation => Error.Validation(description: nameof(InvalidVuMeterOrientation));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter segment count cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterSegmentCountCannotBeNull => Error.Validation(description: nameof(VuMeterSegmentCountCannotBeNull));
|
public static Error VuMeterSegmentCountCannotBeNull => Error.Validation(description: nameof(VuMeterSegmentCountCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter segment count must be between 1 and 128, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterSegmentCountMustBeBetweenOneAndOneHundredTwentyEight => Error.Validation(description: nameof(VuMeterSegmentCountMustBeBetweenOneAndOneHundredTwentyEight));
|
public static Error VuMeterSegmentCountMustBeBetweenOneAndOneHundredTwentyEight => Error.Validation(description: nameof(VuMeterSegmentCountMustBeBetweenOneAndOneHundredTwentyEight));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter segment gap cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterSegmentGapCannotBeNull => Error.Validation(description: nameof(VuMeterSegmentGapCannotBeNull));
|
public static Error VuMeterSegmentGapCannotBeNull => Error.Validation(description: nameof(VuMeterSegmentGapCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the gap between the VU meter segments, in pixels, must be between 0 and 32, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterSegmentGapMustBeBetweenZeroAndThirtyTwo => Error.Validation(description: nameof(VuMeterSegmentGapMustBeBetweenZeroAndThirtyTwo));
|
public static Error VuMeterSegmentGapMustBeBetweenZeroAndThirtyTwo => Error.Validation(description: nameof(VuMeterSegmentGapMustBeBetweenZeroAndThirtyTwo));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter medium threshold cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterMediumThresholdCannotBeNull => Error.Validation(description: nameof(VuMeterMediumThresholdCannotBeNull));
|
public static Error VuMeterMediumThresholdCannotBeNull => Error.Validation(description: nameof(VuMeterMediumThresholdCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter medium threshold must be between 0 and 1, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterMediumThresholdMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VuMeterMediumThresholdMustBeBetweenZeroAndOne));
|
public static Error VuMeterMediumThresholdMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VuMeterMediumThresholdMustBeBetweenZeroAndOne));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter high threshold cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterHighThresholdCannotBeNull => Error.Validation(description: nameof(VuMeterHighThresholdCannotBeNull));
|
public static Error VuMeterHighThresholdCannotBeNull => Error.Validation(description: nameof(VuMeterHighThresholdCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter high threshold must be between 0 and 1, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterHighThresholdMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VuMeterHighThresholdMustBeBetweenZeroAndOne));
|
public static Error VuMeterHighThresholdMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VuMeterHighThresholdMustBeBetweenZeroAndOne));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter high threshold is lower than its medium threshold.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterHighThresholdMustBeGreaterThanOrEqualToMediumThreshold => Error.Validation(description: nameof(VuMeterHighThresholdMustBeGreaterThanOrEqualToMediumThreshold));
|
public static Error VuMeterHighThresholdMustBeGreaterThanOrEqualToMediumThreshold => Error.Validation(description: nameof(VuMeterHighThresholdMustBeGreaterThanOrEqualToMediumThreshold));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the option to show the VU meter peak cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterShowPeakCannotBeNull => Error.Validation(description: nameof(VuMeterShowPeakCannotBeNull));
|
public static Error VuMeterShowPeakCannotBeNull => Error.Validation(description: nameof(VuMeterShowPeakCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter peak hold duration cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterPeakHoldDurationCannotBeNull => Error.Validation(description: nameof(VuMeterPeakHoldDurationCannotBeNull));
|
public static Error VuMeterPeakHoldDurationCannotBeNull => Error.Validation(description: nameof(VuMeterPeakHoldDurationCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter peak hold duration, in milliseconds, must be between 0 and 10000, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterPeakHoldDurationMustBeBetweenZeroAndTenThousandMilliseconds => Error.Validation(description: nameof(VuMeterPeakHoldDurationMustBeBetweenZeroAndTenThousandMilliseconds));
|
public static Error VuMeterPeakHoldDurationMustBeBetweenZeroAndTenThousandMilliseconds => Error.Validation(description: nameof(VuMeterPeakHoldDurationMustBeBetweenZeroAndTenThousandMilliseconds));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter release rate per second cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterReleasePerSecondCannotBeNull => Error.Validation(description: nameof(VuMeterReleasePerSecondCannotBeNull));
|
public static Error VuMeterReleasePerSecondCannotBeNull => Error.Validation(description: nameof(VuMeterReleasePerSecondCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter release rate per second must be between 0 and 100, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterReleasePerSecondMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(VuMeterReleasePerSecondMustBeBetweenZeroAndOneHundred));
|
public static Error VuMeterReleasePerSecondMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(VuMeterReleasePerSecondMustBeBetweenZeroAndOneHundred));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter peak release rate per second cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterPeakReleasePerSecondCannotBeNull => Error.Validation(description: nameof(VuMeterPeakReleasePerSecondCannotBeNull));
|
public static Error VuMeterPeakReleasePerSecondCannotBeNull => Error.Validation(description: nameof(VuMeterPeakReleasePerSecondCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the VU meter peak release rate per second must be between 0 and 100, inclusive.
|
||||||
|
/// </summary>
|
||||||
public static Error VuMeterPeakReleasePerSecondMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(VuMeterPeakReleasePerSecondMustBeBetweenZeroAndOneHundred));
|
public static Error VuMeterPeakReleasePerSecondMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(VuMeterPeakReleasePerSecondMustBeBetweenZeroAndOneHundred));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,10 +9,24 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Groups the errors that report user rule violations and missing users.
|
||||||
|
/// </summary>
|
||||||
public static class Users
|
public static class Users
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the user already exists.
|
||||||
|
/// </summary>
|
||||||
public static Error UserAlreadyExists => Error.Conflict(description: nameof(UserAlreadyExists));
|
public static Error UserAlreadyExists => Error.Conflict(description: nameof(UserAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested user does not exist.
|
||||||
|
/// </summary>
|
||||||
public static Error UserDoesNotExist => Error.NotFound(description: nameof(UserDoesNotExist));
|
public static Error UserDoesNotExist => Error.NotFound(description: nameof(UserDoesNotExist));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the user identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error UserIdCannotBeEmpty => Error.Validation(description: nameof(UserIdCannotBeEmpty));
|
public static Error UserIdCannotBeEmpty => Error.Validation(description: nameof(UserIdCannotBeEmpty));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,38 +9,164 @@ namespace Lumina.Domain.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the errors that report failures raised while working with books and book series.
|
||||||
|
/// </summary>
|
||||||
public static class WrittenContent
|
public static class WrittenContent
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a book with the same identifier or file path already exists in the library.
|
||||||
|
/// </summary>
|
||||||
public static Error BookAlreadyExists => Error.Conflict(description: nameof(BookAlreadyExists));
|
public static Error BookAlreadyExists => Error.Conflict(description: nameof(BookAlreadyExists));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISBN value cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error IsbnValueCannotBeEmpty => Error.Validation(description: nameof(IsbnValueCannotBeEmpty));
|
public static Error IsbnValueCannotBeEmpty => Error.Validation(description: nameof(IsbnValueCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the collection of ISBNs for a book cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error IsbnListCannotBeNull => Error.Validation(description: nameof(IsbnListCannotBeNull));
|
public static Error IsbnListCannotBeNull => Error.Validation(description: nameof(IsbnListCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISBN-10 value does not have a valid ISBN-10 format.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidIsbn10Format => Error.Validation(description: nameof(InvalidIsbn10Format));
|
public static Error InvalidIsbn10Format => Error.Validation(description: nameof(InvalidIsbn10Format));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISBN-13 value does not have a valid ISBN-13 format.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidIsbn13Format => Error.Validation(description: nameof(InvalidIsbn13Format));
|
public static Error InvalidIsbn13Format => Error.Validation(description: nameof(InvalidIsbn13Format));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ISBN format is not a recognized ISBN-10 or ISBN-13 value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownIsbnFormat => Error.Unexpected(description: nameof(UnknownIsbnFormat));
|
public static Error UnknownIsbnFormat => Error.Unexpected(description: nameof(UnknownIsbnFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the book cannot be added to the series because the series already contains it.
|
||||||
|
/// </summary>
|
||||||
public static Error TheBookIsAlreadyInTheSeries => Error.Forbidden(description: nameof(TheBookIsAlreadyInTheSeries));
|
public static Error TheBookIsAlreadyInTheSeries => Error.Forbidden(description: nameof(TheBookIsAlreadyInTheSeries));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the book cannot be removed from the series because the series does not contain it.
|
||||||
|
/// </summary>
|
||||||
public static Error TheBookIsNotInTheSeries => Error.Forbidden(description: nameof(TheBookIsNotInTheSeries));
|
public static Error TheBookIsNotInTheSeries => Error.Forbidden(description: nameof(TheBookIsNotInTheSeries));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an ASIN must be exactly 10 characters long.
|
||||||
|
/// </summary>
|
||||||
public static Error AsinMustBe10CharactersLong => Error.Validation(description: nameof(AsinMustBe10CharactersLong));
|
public static Error AsinMustBe10CharactersLong => Error.Validation(description: nameof(AsinMustBe10CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a Goodreads identifier is not made of digits.
|
||||||
|
/// </summary>
|
||||||
public static Error GoodreadsIdMustBeNumeric => Error.Validation(description: nameof(GoodreadsIdMustBeNumeric));
|
public static Error GoodreadsIdMustBeNumeric => Error.Validation(description: nameof(GoodreadsIdMustBeNumeric));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an LCCN does not have a valid Library of Congress Control Number format.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidLccnFormat => Error.Validation(description: nameof(InvalidLccnFormat));
|
public static Error InvalidLccnFormat => Error.Validation(description: nameof(InvalidLccnFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an OCLC number does not have a valid OCLC format.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidOclcFormat => Error.Validation(description: nameof(InvalidOclcFormat));
|
public static Error InvalidOclcFormat => Error.Validation(description: nameof(InvalidOclcFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an Open Library identifier does not have a valid format.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidOpenLibraryId => Error.Validation(description: nameof(InvalidOpenLibraryId));
|
public static Error InvalidOpenLibraryId => Error.Validation(description: nameof(InvalidOpenLibraryId));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a LibraryThing identifier exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error LibraryThingIdMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LibraryThingIdMustBeMaximum50CharactersLong));
|
public static Error LibraryThingIdMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LibraryThingIdMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a Google Books identifier must be exactly 12 characters long.
|
||||||
|
/// </summary>
|
||||||
public static Error GoogleBooksIdMustBe12CharactersLong => Error.Validation(description: nameof(GoogleBooksIdMustBe12CharactersLong));
|
public static Error GoogleBooksIdMustBe12CharactersLong => Error.Validation(description: nameof(GoogleBooksIdMustBe12CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a Google Books identifier contains characters other than letters, digits, underscores and hyphens.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidGoogleBooksIdFormat => Error.Validation(description: nameof(InvalidGoogleBooksIdFormat));
|
public static Error InvalidGoogleBooksIdFormat => Error.Validation(description: nameof(InvalidGoogleBooksIdFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a Barnes and Noble identifier must be exactly 10 characters long.
|
||||||
|
/// </summary>
|
||||||
public static Error BarnesAndNoblesIdMustBe10CharactersLong => Error.Validation(description: nameof(BarnesAndNoblesIdMustBe10CharactersLong));
|
public static Error BarnesAndNoblesIdMustBe10CharactersLong => Error.Validation(description: nameof(BarnesAndNoblesIdMustBe10CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a Barnes and Noble identifier is not made of digits.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidBarnesAndNoblesIdFormat => Error.Validation(description: nameof(InvalidBarnesAndNoblesIdFormat));
|
public static Error InvalidBarnesAndNoblesIdFormat => Error.Validation(description: nameof(InvalidBarnesAndNoblesIdFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that an Apple Books identifier does not have the expected id prefix followed by digits.
|
||||||
|
/// </summary>
|
||||||
public static Error InvalidAppleBooksIdFormat => Error.Validation(description: nameof(InvalidAppleBooksIdFormat));
|
public static Error InvalidAppleBooksIdFormat => Error.Validation(description: nameof(InvalidAppleBooksIdFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the publisher of a book exceeds the maximum length of 100 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error PublisherMustBeMaximum100CharactersLong => Error.Validation(description: nameof(PublisherMustBeMaximum100CharactersLong));
|
public static Error PublisherMustBeMaximum100CharactersLong => Error.Validation(description: nameof(PublisherMustBeMaximum100CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the page count of a book must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error PageCountMustBeGreaterThanZero => Error.Validation(description: nameof(PageCountMustBeGreaterThanZero));
|
public static Error PageCountMustBeGreaterThanZero => Error.Validation(description: nameof(PageCountMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a book format is not a recognized value.
|
||||||
|
/// </summary>
|
||||||
public static Error UnknownBookFormat => Error.Validation(description: nameof(UnknownBookFormat));
|
public static Error UnknownBookFormat => Error.Validation(description: nameof(UnknownBookFormat));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the edition of a book exceeds the maximum length of 50 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error EditionMustBeMaximum50CharactersLong => Error.Validation(description: nameof(EditionMustBeMaximum50CharactersLong));
|
public static Error EditionMustBeMaximum50CharactersLong => Error.Validation(description: nameof(EditionMustBeMaximum50CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the volume number of a book must be greater than zero.
|
||||||
|
/// </summary>
|
||||||
public static Error VolumeNumberMustBeGreaterThanZero => Error.Validation(description: nameof(VolumeNumberMustBeGreaterThanZero));
|
public static Error VolumeNumberMustBeGreaterThanZero => Error.Validation(description: nameof(VolumeNumberMustBeGreaterThanZero));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the book library cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error BookLibraryCannotBeNull => Error.Validation(description: nameof(BookLibraryCannotBeNull));
|
public static Error BookLibraryCannotBeNull => Error.Validation(description: nameof(BookLibraryCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file path of a book cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error BookPathCannotBeEmpty => Error.Validation(description: nameof(BookPathCannotBeEmpty));
|
public static Error BookPathCannotBeEmpty => Error.Validation(description: nameof(BookPathCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the file path of a book exceeds the maximum length of 2048 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error BookPathMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(BookPathMustBeMaximum2048CharactersLong));
|
public static Error BookPathMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(BookPathMustBeMaximum2048CharactersLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a book file path does not reside within any of the content locations of the library.
|
||||||
|
/// </summary>
|
||||||
public static Error BookPathMustBeWithinLibraryContentLocations => Error.Validation(description: nameof(BookPathMustBeWithinLibraryContentLocations));
|
public static Error BookPathMustBeWithinLibraryContentLocations => Error.Validation(description: nameof(BookPathMustBeWithinLibraryContentLocations));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that a book identifier cannot be empty.
|
||||||
|
/// </summary>
|
||||||
public static Error BookIdCannotBeEmpty => Error.Validation(description: nameof(BookIdCannotBeEmpty));
|
public static Error BookIdCannotBeEmpty => Error.Validation(description: nameof(BookIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the cover image of a book cannot be <see langword="null"/>.
|
||||||
|
/// </summary>
|
||||||
public static Error BookCoverCannotBeNull => Error.Validation(description: nameof(BookCoverCannotBeNull));
|
public static Error BookCoverCannotBeNull => Error.Validation(description: nameof(BookCoverCannotBeNull));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports that the requested book does not exist.
|
||||||
|
/// </summary>
|
||||||
public static Error BookNotFound => Error.NotFound(description: nameof(BookNotFound));
|
public static Error BookNotFound => Error.NotFound(description: nameof(BookNotFound));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,9 @@ namespace Lumina.Domain.Common.Models.Core;
|
|||||||
/// <typeparam name="TId">The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam>
|
/// <typeparam name="TId">The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam>
|
||||||
public abstract class AggregateRoot<TId> : Entity<TId> where TId : notnull
|
public abstract class AggregateRoot<TId> : Entity<TId> where TId : notnull
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The domain events raised by this aggregate root that have not been collected yet.
|
||||||
|
/// </summary>
|
||||||
protected readonly List<IDomainEvent> _domainEvents = [];
|
protected readonly List<IDomainEvent> _domainEvents = [];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,5 @@
|
|||||||
#region ========================================================================= USING =====================================================================================
|
#region ========================================================================= USING =====================================================================================
|
||||||
using Lumina.Domain.Common.Primitives;
|
using Lumina.Domain.Common.Primitives;
|
||||||
|
|
||||||
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||||
using Lumina.Domain.SharedKernel.Common.Enums.FileSystem;
|
using Lumina.Domain.SharedKernel.Common.Enums.FileSystem;
|
||||||
using System;
|
using System;
|
||||||
@@ -49,6 +48,7 @@ public sealed class Directory : FileSystemItem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new instance of the <see cref="Directory"/> class.
|
/// Creates a new instance of the <see cref="Directory"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="path">The file system path of the directory.</param>
|
||||||
/// <param name="name">The name of the directory.</param>
|
/// <param name="name">The name of the directory.</param>
|
||||||
/// <param name="dateCreated">The date and time the directory was created. Can be optional if unknown.</param>
|
/// <param name="dateCreated">The date and time the directory was created. Can be optional if unknown.</param>
|
||||||
/// <param name="dateModified">The date and time the directory was last modified. Can be optional if unknown.</param>
|
/// <param name="dateModified">The date and time the directory was last modified. Can be optional if unknown.</param>
|
||||||
@@ -86,6 +86,7 @@ public sealed class Directory : FileSystemItem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new instance of the <see cref="Directory"/> class.
|
/// Creates a new instance of the <see cref="Directory"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="id">The unique identifier of the directory in the file system path.</param>
|
||||||
/// <param name="name">The name of the directory.</param>
|
/// <param name="name">The name of the directory.</param>
|
||||||
/// <param name="dateCreated">The date and time the directory was created. Can be optional if unknown.</param>
|
/// <param name="dateCreated">The date and time the directory was created. Can be optional if unknown.</param>
|
||||||
/// <param name="dateModified">The date and time the directory was last modified. Can be optional if unknown.</param>
|
/// <param name="dateModified">The date and time the directory was last modified. Can be optional if unknown.</param>
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,5 @@
|
|||||||
#region ========================================================================= USING =====================================================================================
|
#region ========================================================================= USING =====================================================================================
|
||||||
using Lumina.Domain.Common.Primitives;
|
using Lumina.Domain.Common.Primitives;
|
||||||
|
|
||||||
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||||
using Lumina.Domain.SharedKernel.Common.Enums.FileSystem;
|
using Lumina.Domain.SharedKernel.Common.Enums.FileSystem;
|
||||||
using Lumina.Domain.Common.Errors;
|
using Lumina.Domain.Common.Errors;
|
||||||
@@ -49,6 +48,7 @@ public sealed class File : FileSystemItem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new instance of the <see cref="File"/> class.
|
/// Creates a new instance of the <see cref="File"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="path">The file system path of the file.</param>
|
||||||
/// <param name="name">The name of the file.</param>
|
/// <param name="name">The name of the file.</param>
|
||||||
/// <param name="dateCreated">The date and time the file was created. Can be optional if unknown.</param>
|
/// <param name="dateCreated">The date and time the file was created. Can be optional if unknown.</param>
|
||||||
/// <param name="dateModified">The date and time the file was last modified. Can be optional if unknown.</param>
|
/// <param name="dateModified">The date and time the file was last modified. Can be optional if unknown.</param>
|
||||||
|
|||||||
+1
@@ -24,6 +24,7 @@ public class DriveService : IDriveService
|
|||||||
/// Initializes a new instance of the <see cref="DriveService"/> class.
|
/// Initializes a new instance of the <see cref="DriveService"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fileSystem">Injected service used to interact with the local filesystem.</param>
|
/// <param name="fileSystem">Injected service used to interact with the local filesystem.</param>
|
||||||
|
/// <param name="platformContextManager">Injected facade service for platform contextual services.</param>
|
||||||
public DriveService(IFileSystem fileSystem, IPlatformContextManager platformContextManager)
|
public DriveService(IFileSystem fileSystem, IPlatformContextManager platformContextManager)
|
||||||
{
|
{
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
|
|||||||
+8
@@ -322,6 +322,14 @@ public class FileService : IFileService
|
|||||||
return _environmentContext.FileProviderService.DeleteFile(path);
|
return _environmentContext.FileProviderService.DeleteFile(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reads the file at the specified <paramref name="path"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This method is a placeholder that always reports success without reading the file, so it has no error path yet.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="path">The identifier of the file system path of the file to read.</param>
|
||||||
|
/// <returns>A <see cref="Result{TValue}"/> that currently always contains <see langword="true"/>.</returns>
|
||||||
public Result<bool> ReadFile(FileSystemPathId path)
|
public Result<bool> ReadFile(FileSystemPathId path)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
+1
-1
@@ -123,7 +123,7 @@ public class FileTypeService : IFileTypeService
|
|||||||
/// Identifies the image type based on the provided header bytes.
|
/// Identifies the image type based on the provided header bytes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="firstBytes">The first bytes of the file, typically used to identify the file type.</param>
|
/// <param name="firstBytes">The first bytes of the file, typically used to identify the file type.</param>
|
||||||
/// <returns>The type of the image, or <see cref="{ImageType.None}"/> if unrecognized.</returns>
|
/// <returns>The type of the image, or <see cref="ImageType.None"/> if unrecognized.</returns>
|
||||||
private static ImageType IdentifyHeader(byte[] firstBytes)
|
private static ImageType IdentifyHeader(byte[] firstBytes)
|
||||||
{
|
{
|
||||||
if (Encoding.ASCII.GetBytes("BM").SequenceEqual(firstBytes[..2]))
|
if (Encoding.ASCII.GetBytes("BM").SequenceEqual(firstBytes[..2]))
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ public interface IPathService
|
|||||||
/// Tries to combine <paramref name="path"/> with <paramref name="name"/>.
|
/// Tries to combine <paramref name="path"/> with <paramref name="name"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">The path to be combined.</param>
|
/// <param name="path">The path to be combined.</param>
|
||||||
/// <param name="path">The name to be combined with the path.</param>
|
/// <param name="name">The name to be combined with the path.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing the combined path, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing the combined path, or an error.</returns>
|
||||||
Result<string> CombinePath(string path, string name);
|
Result<string> CombinePath(string path, string name);
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -11,6 +11,9 @@ namespace Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPathStrategy
|
public interface IPathStrategy
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the character used to separate path segments on the current platform.
|
||||||
|
/// </summary>
|
||||||
char PathSeparator { get; }
|
char PathSeparator { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -32,7 +35,7 @@ public interface IPathStrategy
|
|||||||
/// Tries to combine <paramref name="path"/> with <paramref name="name"/>.
|
/// Tries to combine <paramref name="path"/> with <paramref name="name"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">The path to be combined.</param>
|
/// <param name="path">The path to be combined.</param>
|
||||||
/// <param name="path">The name to be combined with the path.</param>
|
/// <param name="name">The name to be combined with the path.</param>
|
||||||
/// <returns>An <see cref="Result{TValue}"/> containing the combined path, or an error.</returns>
|
/// <returns>An <see cref="Result{TValue}"/> containing the combined path, or an error.</returns>
|
||||||
Result<FileSystemPathId> CombinePath(FileSystemPathId path, string name);
|
Result<FileSystemPathId> CombinePath(FileSystemPathId path, string name);
|
||||||
|
|
||||||
|
|||||||
+3
@@ -19,6 +19,9 @@ public class UnixPathStrategy : IUnixPathStrategy
|
|||||||
{
|
{
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the character used to separate path segments on UNIX platforms.
|
||||||
|
/// </summary>
|
||||||
public char PathSeparator => '/';
|
public char PathSeparator => '/';
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+3
@@ -19,6 +19,9 @@ public class WindowsPathStrategy : IWindowsPathStrategy
|
|||||||
{
|
{
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the character used to separate path segments on Windows platforms.
|
||||||
|
/// </summary>
|
||||||
public char PathSeparator => '\\';
|
public char PathSeparator => '\\';
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+3
@@ -16,6 +16,9 @@ namespace Lumina.Domain.Core.BoundedContexts.LibraryManagementBoundedContext.Lib
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class MediaLibraryScanJob : IMediaLibraryScanJob
|
public abstract class MediaLibraryScanJob : IMediaLibraryScanJob
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The number of parent media library scan jobs whose payloads have completed and triggered this job. It is incremented atomically, because jobs can run in parallel.
|
||||||
|
/// </summary>
|
||||||
protected int parentsPayloadsExecuted;
|
protected int parentsPayloadsExecuted;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+4
@@ -12,6 +12,10 @@ namespace Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLi
|
|||||||
[DebuggerDisplay("{Id}: {Title}")]
|
[DebuggerDisplay("{Id}: {Title}")]
|
||||||
public sealed class Episode : Entity<EpisodeId>
|
public sealed class Episode : Entity<EpisodeId>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="Episode"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The unique identifier of the episode.</param>
|
||||||
public Episode(EpisodeId id) : base(id)
|
public Episode(EpisodeId id) : base(id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -12,6 +12,10 @@ namespace Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLi
|
|||||||
[DebuggerDisplay("{Id}: {Title}")]
|
[DebuggerDisplay("{Id}: {Title}")]
|
||||||
public sealed class Season : Entity<SeasonId>
|
public sealed class Season : Entity<SeasonId>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="Season"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The unique identifier of the season.</param>
|
||||||
public Season(SeasonId id) : base(id)
|
public Season(SeasonId id) : base(id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -12,6 +12,10 @@ namespace Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLi
|
|||||||
[DebuggerDisplay("{Id}: {Title}")]
|
[DebuggerDisplay("{Id}: {Title}")]
|
||||||
public sealed class TvShow : Entity<TvShowId>
|
public sealed class TvShow : Entity<TvShowId>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="TvShow"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The unique identifier of the TV show.</param>
|
||||||
public TvShow(TvShowId id) : base(id)
|
public TvShow(TvShowId id) : base(id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -93,7 +93,7 @@ public sealed class Book : AggregateRoot<BookId>
|
|||||||
public Optional<string> GoogleBooksId { get; private set; }
|
public Optional<string> GoogleBooksId { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Barnes & Noble ID of the book, if applicable.
|
/// Gets the Barnes & Noble ID of the book, if applicable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Optional<string> BarnesAndNobleId { get; private set; }
|
public Optional<string> BarnesAndNobleId { get; private set; }
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ public sealed class Book : AggregateRoot<BookId>
|
|||||||
/// <param name="openLibraryId">The optional Open Library ID of the book.</param>
|
/// <param name="openLibraryId">The optional Open Library ID of the book.</param>
|
||||||
/// <param name="libraryThingId">The optional LibraryThing ID of the book.</param>
|
/// <param name="libraryThingId">The optional LibraryThing ID of the book.</param>
|
||||||
/// <param name="googleBooksId">The optional Google Books ID of the book.</param>
|
/// <param name="googleBooksId">The optional Google Books ID of the book.</param>
|
||||||
/// <param name="barnesAndNobleId">The optional Barnes & Noble ID of the book.</param>
|
/// <param name="barnesAndNobleId">The optional Barnes & Noble ID of the book.</param>
|
||||||
/// <param name="appleBooksId">The optional Apple Books ID of the book.</param>
|
/// <param name="appleBooksId">The optional Apple Books ID of the book.</param>
|
||||||
/// <param name="createdOnUtc">The date and time when the entity was created.</param>
|
/// <param name="createdOnUtc">The date and time when the entity was created.</param>
|
||||||
/// <param name="updatedOnUtc">The date and time when the entity was last updated.</param>
|
/// <param name="updatedOnUtc">The date and time when the entity was last updated.</param>
|
||||||
@@ -208,7 +208,7 @@ public sealed class Book : AggregateRoot<BookId>
|
|||||||
/// <param name="openLibraryId">The optional Open Library ID of the book.</param>
|
/// <param name="openLibraryId">The optional Open Library ID of the book.</param>
|
||||||
/// <param name="libraryThingId">The optional LibraryThing ID of the book.</param>
|
/// <param name="libraryThingId">The optional LibraryThing ID of the book.</param>
|
||||||
/// <param name="googleBooksId">The optional Google Books ID of the book.</param>
|
/// <param name="googleBooksId">The optional Google Books ID of the book.</param>
|
||||||
/// <param name="barnesAndNobleId">The optional Barnes & Noble ID of the book.</param>
|
/// <param name="barnesAndNobleId">The optional Barnes & Noble ID of the book.</param>
|
||||||
/// <param name="appleBooksId">The optional Apple Books ID of the book.</param>
|
/// <param name="appleBooksId">The optional Apple Books ID of the book.</param>
|
||||||
/// <param name="isbns">The list of ISBNs of the book.</param>
|
/// <param name="isbns">The list of ISBNs of the book.</param>
|
||||||
/// <param name="contributors">The list of media contributors of the book, each carrying the role the contributor played.</param>
|
/// <param name="contributors">The list of media contributors of the book, each carrying the role the contributor played.</param>
|
||||||
@@ -282,7 +282,7 @@ public sealed class Book : AggregateRoot<BookId>
|
|||||||
/// <param name="openLibraryId">The optional Open Library ID of the book.</param>
|
/// <param name="openLibraryId">The optional Open Library ID of the book.</param>
|
||||||
/// <param name="libraryThingId">The optional LibraryThing ID of the book.</param>
|
/// <param name="libraryThingId">The optional LibraryThing ID of the book.</param>
|
||||||
/// <param name="googleBooksId">The optional Google Books ID of the book.</param>
|
/// <param name="googleBooksId">The optional Google Books ID of the book.</param>
|
||||||
/// <param name="barnesAndNobleId">The optional Barnes & Noble ID of the book.</param>
|
/// <param name="barnesAndNobleId">The optional Barnes & Noble ID of the book.</param>
|
||||||
/// <param name="appleBooksId">The optional Apple Books ID of the book.</param>
|
/// <param name="appleBooksId">The optional Apple Books ID of the book.</param>
|
||||||
/// <param name="createdOnUtc">The date and time when the entity was created.</param>
|
/// <param name="createdOnUtc">The date and time when the entity was created.</param>
|
||||||
/// <param name="updatedOnUtc">The date and time when the entity was last updated.</param>
|
/// <param name="updatedOnUtc">The date and time when the entity was last updated.</param>
|
||||||
|
|||||||
+3
@@ -13,6 +13,9 @@ namespace Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext
|
|||||||
[DebuggerDisplay("{Value}")]
|
[DebuggerDisplay("{Value}")]
|
||||||
public sealed class BookSeriesId : ValueObject
|
public sealed class BookSeriesId : ValueObject
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the unique identifier value of the book series.
|
||||||
|
/// </summary>
|
||||||
public Guid Value { get; }
|
public Guid Value { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -9,45 +9,199 @@ namespace Lumina.Infrastructure.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration error types.
|
||||||
|
/// </summary>
|
||||||
public static class Configuration
|
public static class Configuration
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the database connection string is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error DatabaseConnectionStringCannotBeEmpty => Error.Validation(description: nameof(DatabaseConnectionStringCannotBeEmpty));
|
public static Error DatabaseConnectionStringCannotBeEmpty => Error.Validation(description: nameof(DatabaseConnectionStringCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the media root directory is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaRootDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaRootDirectoryCannotBeEmpty));
|
public static Error MediaRootDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaRootDirectoryCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the media libraries directory is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaLibrariesDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaLibrariesDirectoryCannotBeEmpty));
|
public static Error MediaLibrariesDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaLibrariesDirectoryCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the media books directory is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaBooksDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaBooksDirectoryCannotBeEmpty));
|
public static Error MediaBooksDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaBooksDirectoryCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the media music directory is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error MediaMusicDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaMusicDirectoryCannotBeEmpty));
|
public static Error MediaMusicDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaMusicDirectoryCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the encryption secret key is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error EncryptionSecretKeyCannotBeEmpty => Error.Validation(description: nameof(EncryptionSecretKeyCannotBeEmpty));
|
public static Error EncryptionSecretKeyCannotBeEmpty => Error.Validation(description: nameof(EncryptionSecretKeyCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the encryption secret key is not a valid Base64 string.
|
||||||
|
/// </summary>
|
||||||
public static Error EncryptionSecretKeyMustBeABase64String => Error.Validation(description: nameof(EncryptionSecretKeyMustBeABase64String));
|
public static Error EncryptionSecretKeyMustBeABase64String => Error.Validation(description: nameof(EncryptionSecretKeyMustBeABase64String));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the JWT secret key is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error JwtSecretKeyCannotBeEmpty => Error.Validation(description: nameof(JwtSecretKeyCannotBeEmpty));
|
public static Error JwtSecretKeyCannotBeEmpty => Error.Validation(description: nameof(JwtSecretKeyCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the JWT secret key is shorter than the required 32 characters.
|
||||||
|
/// </summary>
|
||||||
public static Error JwtSecretKeyTooShort => Error.Validation(description: nameof(JwtSecretKeyTooShort));
|
public static Error JwtSecretKeyTooShort => Error.Validation(description: nameof(JwtSecretKeyTooShort));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the JWT expiry duration, in minutes, is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error JwtExpiryMinutesMustBePositive => Error.Validation(description: nameof(JwtExpiryMinutesMustBePositive));
|
public static Error JwtExpiryMinutesMustBePositive => Error.Validation(description: nameof(JwtExpiryMinutesMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the JWT issuer is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error JwtIssuerCannotBeEmpty => Error.Validation(description: nameof(JwtIssuerCannotBeEmpty));
|
public static Error JwtIssuerCannotBeEmpty => Error.Validation(description: nameof(JwtIssuerCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the JWT audience is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error JwtAudienceCannotBeEmpty => Error.Validation(description: nameof(JwtAudienceCannotBeEmpty));
|
public static Error JwtAudienceCannotBeEmpty => Error.Validation(description: nameof(JwtAudienceCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when no cross-origin resource sharing origin is configured, or when one of the configured origins is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error CorsOriginsCannotBeEmpty => Error.Validation(description: nameof(CorsOriginsCannotBeEmpty));
|
public static Error CorsOriginsCannotBeEmpty => Error.Validation(description: nameof(CorsOriginsCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when a configured cross-origin resource sharing origin is not the wildcard origin, is not an absolute HTTP or HTTPS URL, or ends with a slash.
|
||||||
|
/// </summary>
|
||||||
public static Error CorsOriginIsInvalid => Error.Validation(description: nameof(CorsOriginIsInvalid));
|
public static Error CorsOriginIsInvalid => Error.Validation(description: nameof(CorsOriginIsInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the plugins directory is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error PluginsDirectoryCannotBeEmpty => Error.Validation(description: nameof(PluginsDirectoryCannotBeEmpty));
|
public static Error PluginsDirectoryCannotBeEmpty => Error.Validation(description: nameof(PluginsDirectoryCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the theme storage path is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeStoragePathCannotBeEmpty => Error.Validation(description: nameof(ThemeStoragePathCannotBeEmpty));
|
public static Error ThemeStoragePathCannotBeEmpty => Error.Validation(description: nameof(ThemeStoragePathCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the path of the bundled themes is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeBundledThemesPathCannotBeEmpty => Error.Validation(description: nameof(ThemeBundledThemesPathCannotBeEmpty));
|
public static Error ThemeBundledThemesPathCannotBeEmpty => Error.Validation(description: nameof(ThemeBundledThemesPathCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the identifier of the default theme is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeDefaultThemeIdCannotBeEmpty => Error.Validation(description: nameof(ThemeDefaultThemeIdCannotBeEmpty));
|
public static Error ThemeDefaultThemeIdCannotBeEmpty => Error.Validation(description: nameof(ThemeDefaultThemeIdCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum allowed size of a theme archive, in bytes, is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeMaxArchiveBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxArchiveBytesMustBePositive));
|
public static Error ThemeMaxArchiveBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxArchiveBytesMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum allowed expanded size of a theme pack, in bytes, is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeMaxExpandedBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxExpandedBytesMustBePositive));
|
public static Error ThemeMaxExpandedBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxExpandedBytesMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum allowed size of a single file in a theme pack, in bytes, is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeMaxSingleFileBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxSingleFileBytesMustBePositive));
|
public static Error ThemeMaxSingleFileBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxSingleFileBytesMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum allowed number of entries in a theme pack archive is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error ThemeMaxEntriesMustBePositive => Error.Validation(description: nameof(ThemeMaxEntriesMustBePositive));
|
public static Error ThemeMaxEntriesMustBePositive => Error.Validation(description: nameof(ThemeMaxEntriesMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the path of the ffmpeg binary is empty.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingFfmpegPathCannotBeEmpty => Error.Validation(description: nameof(TranscodingFfmpegPathCannotBeEmpty));
|
public static Error TranscodingFfmpegPathCannotBeEmpty => Error.Validation(description: nameof(TranscodingFfmpegPathCannotBeEmpty));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingMaxConcurrentJobsMustBePositive => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsMustBePositive));
|
public static Error TranscodingMaxConcurrentJobsMustBePositive => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs exceeds 64.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingMaxConcurrentJobsIsTooLarge => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsIsTooLarge));
|
public static Error TranscodingMaxConcurrentJobsIsTooLarge => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsIsTooLarge));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs per user is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingMaxConcurrentJobsPerUserMustBePositive => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserMustBePositive));
|
public static Error TranscodingMaxConcurrentJobsPerUserMustBePositive => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs per user exceeds 64.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingMaxConcurrentJobsPerUserIsTooLarge => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserIsTooLarge));
|
public static Error TranscodingMaxConcurrentJobsPerUserIsTooLarge => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserIsTooLarge));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs per user exceeds the global maximum.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingMaxConcurrentJobsPerUserExceedsGlobal => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserExceedsGlobal));
|
public static Error TranscodingMaxConcurrentJobsPerUserExceedsGlobal => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserExceedsGlobal));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the maximum size of the normalized audio cache, in bytes, is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingMaxCacheBytesMustBePositive => Error.Validation(description: nameof(TranscodingMaxCacheBytesMustBePositive));
|
public static Error TranscodingMaxCacheBytesMustBePositive => Error.Validation(description: nameof(TranscodingMaxCacheBytesMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the normalization job timeout, in seconds, is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingJobTimeoutMustBePositive => Error.Validation(description: nameof(TranscodingJobTimeoutMustBePositive));
|
public static Error TranscodingJobTimeoutMustBePositive => Error.Validation(description: nameof(TranscodingJobTimeoutMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the normalization job timeout exceeds 86400 seconds.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingJobTimeoutIsTooLong => Error.Validation(description: nameof(TranscodingJobTimeoutIsTooLong));
|
public static Error TranscodingJobTimeoutIsTooLong => Error.Validation(description: nameof(TranscodingJobTimeoutIsTooLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the eviction grace period of the normalized audio cache, in seconds, is not a positive number.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingEvictionGraceSecondsMustBePositive => Error.Validation(description: nameof(TranscodingEvictionGraceSecondsMustBePositive));
|
public static Error TranscodingEvictionGraceSecondsMustBePositive => Error.Validation(description: nameof(TranscodingEvictionGraceSecondsMustBePositive));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the eviction grace period of the normalized audio cache exceeds 86400 seconds.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingEvictionGraceSecondsIsTooLong => Error.Validation(description: nameof(TranscodingEvictionGraceSecondsIsTooLong));
|
public static Error TranscodingEvictionGraceSecondsIsTooLong => Error.Validation(description: nameof(TranscodingEvictionGraceSecondsIsTooLong));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the configured normalized audio cache directory is not a valid file system path.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingCacheDirectoryIsInvalid => Error.Validation(description: nameof(TranscodingCacheDirectoryIsInvalid));
|
public static Error TranscodingCacheDirectoryIsInvalid => Error.Validation(description: nameof(TranscodingCacheDirectoryIsInvalid));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the configured normalized audio cache directory is inside the media root, or is the media root itself.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingCacheDirectoryIsInsideMediaRoot => Error.Validation(description: nameof(TranscodingCacheDirectoryIsInsideMediaRoot));
|
public static Error TranscodingCacheDirectoryIsInsideMediaRoot => Error.Validation(description: nameof(TranscodingCacheDirectoryIsInsideMediaRoot));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the configured normalized audio cache directory contains the media root.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingCacheDirectoryContainsMediaRoot => Error.Validation(description: nameof(TranscodingCacheDirectoryContainsMediaRoot));
|
public static Error TranscodingCacheDirectoryContainsMediaRoot => Error.Validation(description: nameof(TranscodingCacheDirectoryContainsMediaRoot));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the configured normalized audio cache directory is a file system root, the application base directory or one of its ancestors, or overlaps the logs or plugins directories.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingCacheDirectoryIsUnsafeLocation => Error.Validation(description: nameof(TranscodingCacheDirectoryIsUnsafeLocation));
|
public static Error TranscodingCacheDirectoryIsUnsafeLocation => Error.Validation(description: nameof(TranscodingCacheDirectoryIsUnsafeLocation));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a validation failure when the default normalized audio cache directory, used when no cache directory is configured, is inside the media root.
|
||||||
|
/// </summary>
|
||||||
public static Error TranscodingDefaultCacheDirectoryIsInsideMediaRoot => Error.Validation(description: nameof(TranscodingDefaultCacheDirectoryIsInsideMediaRoot));
|
public static Error TranscodingDefaultCacheDirectoryIsInsideMediaRoot => Error.Validation(description: nameof(TranscodingDefaultCacheDirectoryIsInsideMediaRoot));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,8 +9,14 @@ namespace Lumina.Infrastructure.Common.Errors;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class Errors
|
public static partial class Errors
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Media library scan error types.
|
||||||
|
/// </summary>
|
||||||
public static class LibraryScanning
|
public static class LibraryScanning
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error that reports a failure when the progress tracker of a media library scan job could not be created.
|
||||||
|
/// </summary>
|
||||||
public static Error FailedToCreateScanJobProgress => Error.Failure(description: nameof(FailedToCreateScanJobProgress));
|
public static Error FailedToCreateScanJobProgress => Error.Failure(description: nameof(FailedToCreateScanJobProgress));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,11 +5,14 @@ using System.Diagnostics;
|
|||||||
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Data transfer object for deserializing media settings.
|
/// Data transfer object for deserializing cross-origin resource sharing settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DebuggerDisplay("{SECTION_NAME}")]
|
[DebuggerDisplay("{SECTION_NAME}")]
|
||||||
public class CorsSettingsDto
|
public class CorsSettingsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the cross-origin resource sharing settings.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "CorsSettings";
|
public const string SECTION_NAME = "CorsSettings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
|||||||
[DebuggerDisplay("{SECTION_NAME}")]
|
[DebuggerDisplay("{SECTION_NAME}")]
|
||||||
public class DatabaseSettingsDto
|
public class DatabaseSettingsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the database connection strings.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "ConnectionStrings";
|
public const string SECTION_NAME = "ConnectionStrings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -5,15 +5,18 @@ using System.Diagnostics;
|
|||||||
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Data transfer object for deserializing media settings.
|
/// Data transfer object for deserializing encryption settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DebuggerDisplay("{SECTION_NAME}")]
|
[DebuggerDisplay("{SECTION_NAME}")]
|
||||||
public class EncryptionSettingsDto
|
public class EncryptionSettingsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the encryption settings.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "EncryptionSettings";
|
public const string SECTION_NAME = "EncryptionSettings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the root directory where media files are stored.
|
/// Gets or sets the Base64 encoded secret key used to encrypt and decrypt protected data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public required string SecretKey { get; init; }
|
public required string SecretKey { get; init; }
|
||||||
}
|
}
|
||||||
@@ -5,11 +5,14 @@ using System.Diagnostics;
|
|||||||
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Data transfer object for deserializing media settings.
|
/// Data transfer object for deserializing JSON Web Token settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DebuggerDisplay("{SECTION_NAME}")]
|
[DebuggerDisplay("{SECTION_NAME}")]
|
||||||
public class JwtSettingsDto
|
public class JwtSettingsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the JSON Web Token settings.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "JwtSettings";
|
public const string SECTION_NAME = "JwtSettings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
|||||||
[DebuggerDisplay("Section name: {SECTION_NAME}")]
|
[DebuggerDisplay("Section name: {SECTION_NAME}")]
|
||||||
public sealed class ThemeEngineOptionsDto
|
public sealed class ThemeEngineOptionsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the theme engine settings.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "ThemeEngine";
|
public const string SECTION_NAME = "ThemeEngine";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
|||||||
[DebuggerDisplay("Section name: {SECTION_NAME}")]
|
[DebuggerDisplay("Section name: {SECTION_NAME}")]
|
||||||
public sealed class TranscodingSettingsDto
|
public sealed class TranscodingSettingsDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the configuration section that holds the settings of the audio normalization pipeline.
|
||||||
|
/// </summary>
|
||||||
public const string SECTION_NAME = "TranscodingSettings";
|
public const string SECTION_NAME = "TranscodingSettings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+1
@@ -718,6 +718,7 @@ internal sealed class TrackNormalizationService : ITrackNormalizationService, ID
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs ffmpeg to write the normalized audio of a track into a temporary directory, and builds the index of the produced segments.
|
/// Runs ffmpeg to write the normalized audio of a track into a temporary directory, and builds the index of the produced segments.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="cacheId">The opaque identifier of the cache entry the normalized audio is produced for.</param>
|
||||||
/// <param name="request">The track, the delivery decision and the quality cap the normalized audio is produced with.</param>
|
/// <param name="request">The track, the delivery decision and the quality cap the normalized audio is produced with.</param>
|
||||||
/// <param name="inputPath">The path of the private snapshot of the stored audio file, which was copied from the validated handle.</param>
|
/// <param name="inputPath">The path of the private snapshot of the stored audio file, which was copied from the validated handle.</param>
|
||||||
/// <param name="format">The container and codec combination the normalized audio is produced in.</param>
|
/// <param name="format">The container and codec combination the normalized audio is produced in.</param>
|
||||||
|
|||||||
+1
-1
@@ -470,7 +470,7 @@ internal sealed class MusicMediaLibraryScanMetadataEnricher : IMediaLibraryScanM
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds the media contributor with the name of the provided <paramref name="contributor"/>, or creates it, caching it by its normalized display name
|
/// Finds the media contributors with the names of the provided <paramref name="contributors"/>, or creates them, caching them by their normalized display name
|
||||||
/// so that a contributor is only created once even when the same person is discovered for many items of the same page.
|
/// so that a contributor is only created once even when the same person is discovered for many items of the same page.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="contributors">The metadata contributors to resolve.</param>
|
/// <param name="contributors">The metadata contributors to resolve.</param>
|
||||||
|
|||||||
+3
-2
@@ -1,7 +1,5 @@
|
|||||||
#region ========================================================================= USING =====================================================================================
|
#region ========================================================================= USING =====================================================================================
|
||||||
using Ganss.Xss;
|
using Ganss.Xss;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Lumina.Infrastructure.Core.MediaLibrary.WrittenContentLibrary.BookLibrary.Reading;
|
namespace Lumina.Infrastructure.Core.MediaLibrary.WrittenContentLibrary.BookLibrary.Reading;
|
||||||
@@ -12,6 +10,9 @@ namespace Lumina.Infrastructure.Core.MediaLibrary.WrittenContentLibrary.BookLibr
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static class ReadingContentSanitizer
|
public static class ReadingContentSanitizer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the attribute that carries the opaque key of a resource referenced by a reading section, which the reader replaces with the URL of the resource endpoint.
|
||||||
|
/// </summary>
|
||||||
public const string RESOURCE_ATTRIBUTE = "data-lumina-resource";
|
public const string RESOURCE_ATTRIBUTE = "data-lumina-resource";
|
||||||
|
|
||||||
// The sanitizer that preserves the style attribute, used for the users who want the books to keep their original look, and the
|
// The sanitizer that preserves the style attribute, used for the users who want the books to keep their original look, and the
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Loaded 100 of 202 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user