mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Refactors directory structure for commands and queries
This commit is contained in:
1 parent
35fe931173
commit
712a0f2b27
54 files changed
+111
-101
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectories;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the list of directories at a path.
|
||||
+2
-2
@@ -11,7 +11,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectories;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get all directories.
|
||||
@@ -44,7 +44,7 @@ public class GetDirectoriesQueryHandler : IRequestHandler<GetDirectoriesQuery, E
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<IEnumerable<DirectoryResponse>>> Handle(GetDirectoriesQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<IEnumerable<Directory>> result = _directoryService.GetSubdirectories(request.Path);
|
||||
var result = _directoryService.GetSubdirectories(request.Path);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(result.Value.Adapt<IEnumerable<DirectoryResponse>>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectories;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="GetDirectoriesQuery"/>.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectoryTree;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the tree of directories of a path.
|
||||
+19
-19
@@ -14,7 +14,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectoryTree;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get a directory tree.
|
||||
@@ -56,24 +56,24 @@ public class GetDirectoryTreeQueryHandler : IRequestHandler<GetDirectoryTreeQuer
|
||||
{
|
||||
List<FileSystemTreeNodeResponse> result = [];
|
||||
// retrieve the list of drives
|
||||
ErrorOr<IEnumerable<FileSystemTreeNodeResponse>> getDrivesResult = GetDrives();
|
||||
var getDrivesResult = GetDrives();
|
||||
if (getDrivesResult.IsError)
|
||||
return getDrivesResult.Errors;
|
||||
result.AddRange(getDrivesResult.Value);
|
||||
|
||||
ErrorOr<IEnumerable<PathSegment>> pathPartsResults = _pathService.ParsePath(request.Path);
|
||||
var pathPartsResults = _pathService.ParsePath(request.Path);
|
||||
if (pathPartsResults.IsError)
|
||||
return pathPartsResults.Errors;
|
||||
|
||||
List<PathSegment> pathParts = pathPartsResults.Value.ToList();
|
||||
string currentPath = pathParts[0].Name;
|
||||
var pathParts = pathPartsResults.Value.ToList();
|
||||
var currentPath = pathParts[0].Name;
|
||||
|
||||
ErrorOr<IEnumerable<FileSystemTreeNodeResponse>> buildDirectoryTreeResult = BuildDirectoryTree(result, pathParts, out FileSystemTreeNodeResponse currentNode);
|
||||
var buildDirectoryTreeResult = BuildDirectoryTree(result, pathParts, out var currentNode);
|
||||
if (buildDirectoryTreeResult.IsError)
|
||||
return buildDirectoryTreeResult.Errors;
|
||||
|
||||
// add subdirectories of the last directory node
|
||||
ErrorOr<Success> loadChildrenResult = LoadChildren(currentNode, request.IncludeFiles);
|
||||
var loadChildrenResult = LoadChildren(currentNode, request.IncludeFiles);
|
||||
if (loadChildrenResult.IsError)
|
||||
return loadChildrenResult.Errors;
|
||||
return await ValueTask.FromResult(result);
|
||||
@@ -87,7 +87,7 @@ public class GetDirectoryTreeQueryHandler : IRequestHandler<GetDirectoryTreeQuer
|
||||
/// </returns>
|
||||
private ErrorOr<IEnumerable<FileSystemTreeNodeResponse>> GetDrives()
|
||||
{
|
||||
ErrorOr<IEnumerable<FileSystemItem>> driveResult = _driveService.GetDrives();
|
||||
var driveResult = _driveService.GetDrives();
|
||||
if (driveResult.IsError)
|
||||
return driveResult.Errors;
|
||||
return ErrorOrFactory.From(driveResult.Value.Adapt<IEnumerable<FileSystemTreeNodeResponse>>());
|
||||
@@ -104,21 +104,21 @@ public class GetDirectoryTreeQueryHandler : IRequestHandler<GetDirectoryTreeQuer
|
||||
private ErrorOr<IEnumerable<FileSystemTreeNodeResponse>> BuildDirectoryTree(List<FileSystemTreeNodeResponse> drives, List<PathSegment> pathParts, out FileSystemTreeNodeResponse currentNode)
|
||||
{
|
||||
// find the root drive that matches the first part of the path
|
||||
FileSystemTreeNodeResponse drive = drives.First(d => d.Name.Contains(pathParts[0].Name));
|
||||
var drive = drives.First(d => d.Name.Contains(pathParts[0].Name));
|
||||
drive.IsExpanded = true;
|
||||
currentNode = drive;
|
||||
string currentPath = pathParts[0].Name;
|
||||
var currentPath = pathParts[0].Name;
|
||||
|
||||
// traverse the remaining path parts to build the tree structure
|
||||
for (int i = 1; i < pathParts.Count; i++)
|
||||
for (var i = 1; i < pathParts.Count; i++)
|
||||
{
|
||||
ErrorOr<string> combinedPathResult = _pathService.CombinePath(currentPath, pathParts[i].Name);
|
||||
var combinedPathResult = _pathService.CombinePath(currentPath, pathParts[i].Name);
|
||||
if (combinedPathResult.IsError)
|
||||
return combinedPathResult.Errors;
|
||||
|
||||
currentPath = combinedPathResult.Value;
|
||||
// create a new node for the directory and add it as a child of the current node
|
||||
FileSystemTreeNodeResponse newNode = new FileSystemTreeNodeResponse
|
||||
var newNode = new FileSystemTreeNodeResponse
|
||||
{
|
||||
Path = currentPath,
|
||||
Name = pathParts[i].Name,
|
||||
@@ -140,13 +140,13 @@ public class GetDirectoryTreeQueryHandler : IRequestHandler<GetDirectoryTreeQuer
|
||||
private ErrorOr<Success> LoadChildren(FileSystemTreeNodeResponse node, bool includeFiles)
|
||||
{
|
||||
// get subdirectories under the current node's path
|
||||
ErrorOr<IEnumerable<Directory>> subDirectoriesResult = _directoryService.GetSubdirectories(node.Path);
|
||||
var subDirectoriesResult = _directoryService.GetSubdirectories(node.Path);
|
||||
if (subDirectoriesResult.IsError)
|
||||
return subDirectoriesResult.Errors;
|
||||
// add each subdirectory as a child node of the current directory
|
||||
foreach (Directory subDirectory in subDirectoriesResult.Value)
|
||||
foreach (var subDirectory in subDirectoriesResult.Value)
|
||||
{
|
||||
FileSystemTreeNodeResponse subDirNode = new FileSystemTreeNodeResponse
|
||||
var subDirNode = new FileSystemTreeNodeResponse
|
||||
{
|
||||
Name = subDirectory.Name,
|
||||
Path = subDirectory.Id.Path,
|
||||
@@ -159,13 +159,13 @@ public class GetDirectoryTreeQueryHandler : IRequestHandler<GetDirectoryTreeQuer
|
||||
if (includeFiles)
|
||||
{
|
||||
// get files under the current node's path
|
||||
ErrorOr<IEnumerable<File>> filesResult = _fileService.GetFiles(node.Path);
|
||||
var filesResult = _fileService.GetFiles(node.Path);
|
||||
if (filesResult.IsError)
|
||||
return filesResult.Errors;
|
||||
// add each file as a child node of the current directory
|
||||
foreach (File file in filesResult.Value)
|
||||
foreach (var file in filesResult.Value)
|
||||
{
|
||||
FileSystemTreeNodeResponse fileNode = new FileSystemTreeNodeResponse
|
||||
var fileNode = new FileSystemTreeNodeResponse
|
||||
{
|
||||
Name = file.Name,
|
||||
Path = file.Id.Path,
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectoryTree;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="GetDirectoryTreeQuery"/>.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetTreeDirectories;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the list of directories at a path.
|
||||
+2
-2
@@ -11,7 +11,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetTreeDirectories;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get all directories.
|
||||
@@ -44,7 +44,7 @@ public class GetTreeDirectoriesQueryHandler : IRequestHandler<GetTreeDirectories
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<IEnumerable<FileSystemTreeNodeResponse>>> Handle(GetTreeDirectoriesQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<IEnumerable<Directory>> result = _directoryService.GetSubdirectories(request.Path);
|
||||
var result = _directoryService.GetSubdirectories(request.Path);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(result.Value.Adapt<IEnumerable<FileSystemTreeNodeResponse>>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetTreeDirectories;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="GetTreeDirectoriesQuery"/>.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Drives.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Drives.Queries.GetDrives;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the list of drives.
|
||||
+2
-2
@@ -10,7 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Drives.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Drives.Queries.GetDrives;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get all drives.
|
||||
@@ -43,7 +43,7 @@ public class GetDrivesQueryHandler : IRequestHandler<GetDrivesQuery, ErrorOr<IEn
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<IEnumerable<FileSystemTreeNodeResponse>>> Handle(GetDrivesQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<IEnumerable<FileSystemItem>> result = _driveService.GetDrives();
|
||||
var result = _driveService.GetDrives();
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(values.Adapt<IEnumerable<FileSystemTreeNodeResponse>>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Lumina.Contracts.Responses.FileManagement;
|
||||
using Mediator;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.FileSystem.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.FileSystem.Queries.GetFileSysem;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the file system type.
|
||||
+1
-1
@@ -6,7 +6,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.FileSystem.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.FileSystem.Queries.GetFileSysem;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get the file system type.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries.GetFiles;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the list of files at a path.
|
||||
+2
-2
@@ -10,7 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries.GetFiles;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get all files.
|
||||
@@ -43,7 +43,7 @@ public class GetFilesQueryHandler : IRequestHandler<GetFilesQuery, ErrorOr<IEnum
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<IEnumerable<FileResponse>>> Handle(GetFilesQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<IEnumerable<File>> result = _fileService.GetFiles(request.Path);
|
||||
var result = _fileService.GetFiles(request.Path);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(result.Value.Adapt<IEnumerable<FileResponse>>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries.GetFiles;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="GetFilesQuery"/>.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries.GetTreeFiles;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the list of files at a path.
|
||||
+2
-2
@@ -10,7 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries.GetTreeFiles;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get all files.
|
||||
@@ -43,7 +43,7 @@ public class GetTreeFilesQueryHandler : IRequestHandler<GetTreeFilesQuery, Error
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<IEnumerable<FileSystemTreeNodeResponse>>> Handle(GetTreeFilesQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<IEnumerable<File>> result = _fileService.GetFiles(request.Path);
|
||||
var result = _fileService.GetFiles(request.Path);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(result.Value.Adapt<IEnumerable<FileSystemTreeNodeResponse>>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Files.Queries.GetTreeFiles;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="GetTreeFilesQuery"/>.
|
||||
+1
-1
@@ -4,7 +4,7 @@ using Lumina.Contracts.Responses.FileManagement;
|
||||
using Mediator;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands.CombinePath;
|
||||
|
||||
/// <summary>
|
||||
/// Command for combining two file system path.
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Commands.SplitPath;
|
||||
using Lumina.Contracts.Responses.FileManagement;
|
||||
using Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.Services;
|
||||
using Mapster;
|
||||
@@ -8,7 +9,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands.CombinePath;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the command to split a file system path.
|
||||
@@ -41,7 +42,7 @@ public class CombinePathCommandHandler : IRequestHandler<CombinePathCommand, Err
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<PathSegmentResponse>> Handle(CombinePathCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<string> result = _pathService.CombinePath(request.OriginalPath, request.NewPath);
|
||||
var result = _pathService.CombinePath(request.OriginalPath, request.NewPath);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(new PathSegmentResponse(result.Value)), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands.CombinePath;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="CombinePathCommand"/>.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands.SplitPath;
|
||||
|
||||
/// <summary>
|
||||
/// Command for splitting a file system path.
|
||||
+2
-2
@@ -10,7 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands.SplitPath;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the command to split a file system path.
|
||||
@@ -43,7 +43,7 @@ public class SplitPathCommandHandler : IRequestHandler<SplitPathCommand, ErrorOr
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<IEnumerable<PathSegmentResponse>>> Handle(SplitPathCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<IEnumerable<PathSegment>> result = _pathService.ParsePath(request.Path);
|
||||
var result = _pathService.ParsePath(request.Path);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(result.Value.Adapt<IEnumerable<PathSegmentResponse>>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Commands.SplitPath;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="SplitPathCommand"/>.
|
||||
+2
@@ -3,6 +3,8 @@ using Lumina.Contracts.Responses.FileManagement;
|
||||
using Mediator;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.CheckPathExists;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the existence of a file system path.
|
||||
/// </summary>
|
||||
+1
-1
@@ -6,7 +6,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.CheckPathExists;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to check the existence a file system path.
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.CheckPathExists;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="CheckPathExistsQuery"/>.
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathParent;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the parent of a file system path.
|
||||
+2
-2
@@ -10,7 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathParent;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get the parent of a file system path.
|
||||
@@ -43,7 +43,7 @@ public class GetPathParentQueryHandler : IRequestHandler<GetPathParentQuery, Err
|
||||
/// </returns>
|
||||
public ValueTask<ErrorOr<IEnumerable<PathSegmentResponse>>> Handle(GetPathParentQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<IEnumerable<PathSegment>> result = _pathService.GoUpOneLevel(request.Path);
|
||||
var result = _pathService.GoUpOneLevel(request.Path);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(result.Value.Adapt<IEnumerable<PathSegmentResponse>>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathParent;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="GetPathParentQuery"/>.
|
||||
+1
-1
@@ -4,7 +4,7 @@ using Lumina.Contracts.Responses.FileManagement;
|
||||
using Mediator;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathRoot;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the root of a path.
|
||||
+2
-2
@@ -9,7 +9,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathRoot;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get the root of a file system path.
|
||||
@@ -40,7 +40,7 @@ public class GetPathRootQueryHandler : IRequestHandler<GetPathRootQuery, ErrorOr
|
||||
/// <returns>The root of the specified path.</returns>
|
||||
public ValueTask<ErrorOr<PathSegmentResponse>> Handle(GetPathRootQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<PathSegment> result = _pathService.GetPathRoot(request.Path);
|
||||
var result = _pathService.GetPathRoot(request.Path);
|
||||
return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(result.Value.Adapt<PathSegmentResponse>()), errors => errors));
|
||||
}
|
||||
#endregion
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathRoot;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="GetPathRootQuery"/>.
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Lumina.Contracts.Responses.FileManagement;
|
||||
using Mediator;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathSeparator;
|
||||
|
||||
/// <summary>
|
||||
/// Query for retrieving the file system path separator.
|
||||
+1
-1
@@ -6,7 +6,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathSeparator;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get the path separator character of a file system path.
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Lumina.Contracts.Responses.FileManagement;
|
||||
using Mediator;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.ValidatePath;
|
||||
|
||||
/// <summary>
|
||||
/// Query for validating a path.
|
||||
+1
-1
@@ -6,7 +6,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.ValidatePath;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to validate a file system path.
|
||||
+1
-1
@@ -3,7 +3,7 @@ using FluentValidation;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
namespace Lumina.Application.Core.FileManagement.Paths.Queries.ValidatePath;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="ValidatePathQuery"/>.
|
||||
+1
-1
@@ -9,7 +9,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
|
||||
/// <summary>
|
||||
/// Command for adding a book.
|
||||
+14
-14
@@ -19,7 +19,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the command to add a book.
|
||||
@@ -57,7 +57,7 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
|
||||
{
|
||||
// TODO: update Api.Book.md documentation when the functionality is fully implemented
|
||||
List<MediaContributorId> contributorIds = [];
|
||||
foreach(var mediaContributor in request.Contributors)
|
||||
foreach (var mediaContributor in request.Contributors)
|
||||
{
|
||||
// TODO: add logic to search the media contributors repository for existing contributors, based on the provided names
|
||||
}
|
||||
@@ -76,26 +76,26 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
|
||||
var errors = domainRatingsResult.Where(ratingResult => ratingResult.IsError).SelectMany(ratingResult => ratingResult.Errors).ToList();
|
||||
if (errors.Count != 0) // if there are errors, return them
|
||||
return errors;
|
||||
|
||||
List<BookRating> domainRatings = domainRatingsResult.Select(rating => rating.Value).ToList();
|
||||
|
||||
var domainRatings = domainRatingsResult.Select(rating => rating.Value).ToList();
|
||||
|
||||
var domainGenresResult = request.Metadata.Genres!.ConvertAll(genre => Genre.Create(genre.Name!));
|
||||
errors = domainGenresResult.Where(genreResult => genreResult.IsError).SelectMany(genreResult => genreResult.Errors).ToList();
|
||||
if (errors.Count != 0)
|
||||
if (errors.Count != 0)
|
||||
return errors;
|
||||
List<Genre> domainGenres = domainGenresResult.Select(genre => genre.Value).ToList();
|
||||
var domainGenres = domainGenresResult.Select(genre => genre.Value).ToList();
|
||||
|
||||
var domainTagsResult = request.Metadata.Tags!.ConvertAll(tag => Tag.Create(tag.Name!));
|
||||
errors = domainTagsResult.Where(tagResult => tagResult.IsError).SelectMany(tagResult => tagResult.Errors).ToList();
|
||||
if (errors.Count != 0)
|
||||
return errors;
|
||||
List<Tag> domainTags = domainTagsResult.Select(tag => tag.Value).ToList();
|
||||
var domainTags = domainTagsResult.Select(tag => tag.Value).ToList();
|
||||
|
||||
var domainIsbnsResult = request.ISBNs.ConvertAll(isbn => Isbn.Create(isbn.Value!, (IsbnFormat)(int)isbn.Format!));
|
||||
errors = domainIsbnsResult.Where(isbnResult => isbnResult.IsError).SelectMany(isbnResult => isbnResult.Errors).ToList();
|
||||
if (errors.Count != 0)
|
||||
return errors;
|
||||
List<Isbn> domainIsbns = domainIsbnsResult.Select(isbn => isbn.Value).ToList();
|
||||
var domainIsbns = domainIsbnsResult.Select(isbn => isbn.Value).ToList();
|
||||
|
||||
var releaseInfoResult = ReleaseInfo.Create(
|
||||
Optional<DateOnly>.FromNullable(request.Metadata.ReleaseInfo!.OriginalReleaseDate),
|
||||
@@ -107,13 +107,13 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
|
||||
);
|
||||
if (releaseInfoResult.IsError)
|
||||
return releaseInfoResult.Errors;
|
||||
ReleaseInfo releaseInfo = releaseInfoResult.Value;
|
||||
var releaseInfo = releaseInfoResult.Value;
|
||||
LanguageInfo? languageInfo = null;
|
||||
if (request.Metadata.Language is not null)
|
||||
if (request.Metadata.Language is not null)
|
||||
{
|
||||
var languageInfoResult = LanguageInfo.Create(
|
||||
request.Metadata.Language.LanguageCode!,
|
||||
request.Metadata.Language.LanguageName!,
|
||||
request.Metadata.Language.LanguageCode!,
|
||||
request.Metadata.Language.LanguageName!,
|
||||
Optional<string>.FromNullable(request.Metadata.Language.NativeName));
|
||||
if (languageInfoResult.IsError)
|
||||
return languageInfoResult.Errors;
|
||||
@@ -123,7 +123,7 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
|
||||
if (request.Metadata.OriginalLanguage is not null)
|
||||
{
|
||||
var originalLanguageInfoResult = LanguageInfo.Create(
|
||||
request.Metadata.OriginalLanguage.LanguageCode!,
|
||||
request.Metadata.OriginalLanguage.LanguageCode!,
|
||||
request.Metadata.OriginalLanguage.LanguageName!,
|
||||
Optional<string>.FromNullable(request.Metadata.OriginalLanguage.NativeName));
|
||||
if (originalLanguageInfoResult.IsError)
|
||||
@@ -140,7 +140,7 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
|
||||
Optional<LanguageInfo>.FromNullable(languageInfo),
|
||||
Optional<LanguageInfo>.FromNullable(originalLanguageInfo),
|
||||
Optional<string>.FromNullable(request.Metadata.Publisher),
|
||||
Optional<int>.FromNullable(request.Metadata.PageCount)
|
||||
Optional<int>.FromNullable(request.Metadata.PageCount)
|
||||
);
|
||||
if (metadataResult.IsError)
|
||||
return metadataResult.Errors;
|
||||
+6
-6
@@ -4,7 +4,7 @@ using Lumina.Contracts.Enums.BookLibrary;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
|
||||
/// <summary>
|
||||
/// Validates the needed validation rules for <see cref="AddBookCommand"/>.
|
||||
@@ -64,14 +64,14 @@ public class AddBookCommandValidator : AbstractValidator<AddBookCommand>
|
||||
metadata.RuleFor(m => m.Genres)
|
||||
.NotNull().WithMessage(Errors.Metadata.GenresListCannotBeNull.Code);
|
||||
metadata.RuleForEach(m => m.Genres)
|
||||
.ChildRules(g =>
|
||||
.ChildRules(g =>
|
||||
g.RuleFor(genre => genre.Name)
|
||||
.NotEmpty().WithMessage(Errors.Metadata.GenreNameCannotBeEmpty.Code)
|
||||
.MaximumLength(50).WithMessage(Errors.Metadata.GenreNameMustBeMaximum50CharactersLong.Code));
|
||||
metadata.RuleFor(m => m.Tags)
|
||||
.NotNull().WithMessage(Errors.Metadata.TagsListCannotBeNull.Code);
|
||||
metadata.RuleForEach(m => m.Tags)
|
||||
.ChildRules(t =>
|
||||
.ChildRules(t =>
|
||||
t.RuleFor(tag => tag.Name)
|
||||
.NotEmpty().WithMessage(Errors.Metadata.TagNameCannotBeEmpty.Code)
|
||||
.MaximumLength(50).WithMessage(Errors.Metadata.TagNameMustBeMaximum50CharactersLong.Code));
|
||||
@@ -117,7 +117,7 @@ public class AddBookCommandValidator : AbstractValidator<AddBookCommand>
|
||||
.GreaterThan(0).When(x => x.VolumeNumber.HasValue)
|
||||
.WithMessage(Errors.WrittenContent.VolumeNumberMustBeGreaterThanZero.Code);
|
||||
RuleFor(x => x.Series)
|
||||
.ChildRules(s =>
|
||||
.ChildRules(s =>
|
||||
s.RuleFor(series => series!.Title)
|
||||
.NotEmpty().WithMessage(Errors.Metadata.TitleCannotBeEmpty.Code)
|
||||
.MaximumLength(255)).WithMessage(Errors.Metadata.TitleMustBeMaximum255CharactersLong.Code)
|
||||
@@ -127,7 +127,7 @@ public class AddBookCommandValidator : AbstractValidator<AddBookCommand>
|
||||
.WithMessage(Errors.WrittenContent.AsinMustBe10CharactersLong.Code);
|
||||
RuleFor(x => x.GoodreadsId)
|
||||
.Matches(@"^\d+$").When(x => x.GoodreadsId is not null)
|
||||
.WithMessage(Errors.WrittenContent.GoodreadsIdMustBeNumeric.Code);
|
||||
.WithMessage(Errors.WrittenContent.GoodreadsIdMustBeNumeric.Code);
|
||||
RuleFor(x => x.LCCN)
|
||||
.Matches(@"^[a-z]{0,3}\d{8,10}$").WithMessage(Errors.WrittenContent.InvalidLccnFormat.Code)
|
||||
.When(x => x.LCCN is not null);
|
||||
@@ -185,7 +185,7 @@ public class AddBookCommandValidator : AbstractValidator<AddBookCommand>
|
||||
.WithMessage(Errors.MediaContributor.ContributorLegalNameMustBeMaximum100CharactersLong.Code);
|
||||
});
|
||||
contributor.RuleFor(c => c.Role)
|
||||
.NotNull().WithMessage(Errors.MediaContributor.ContributorRoleCannotBeNull.Code)
|
||||
.NotNull().WithMessage(Errors.MediaContributor.ContributorRoleCannotBeNull.Code)
|
||||
.ChildRules(role =>
|
||||
{
|
||||
role.RuleFor(r => r!.Name)
|
||||
+1
-1
@@ -5,7 +5,7 @@ using Mediator;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries;
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries.GetBooks;
|
||||
|
||||
/// <summary>
|
||||
/// Query for getting all books.
|
||||
+1
-1
@@ -10,7 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries;
|
||||
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries.GetBooks;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for the query to get all books.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
using Lumina.Contracts.Requests.WrittenContentLibrary.BookLibrary;
|
||||
using Mapster;
|
||||
#endregion
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
using Lumina.Application.Core.FileManagement.Directories.Queries;
|
||||
using Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectories;
|
||||
using Lumina.Application.Core.FileManagement.Directories.Queries.GetDirectoryTree;
|
||||
using Lumina.Application.Core.FileManagement.Directories.Queries.GetTreeDirectories;
|
||||
using Lumina.Contracts.Responses.FileManagement;
|
||||
using Lumina.Presentation.Api.Common.ModelBinders;
|
||||
using Lumina.Presentation.Api.Core.Controllers.Common;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
using Lumina.Application.Core.FileManagement.Drives.Queries;
|
||||
using Lumina.Application.Core.FileManagement.Drives.Queries.GetDrives;
|
||||
using Lumina.Contracts.Responses.FileManagement;
|
||||
using Lumina.Presentation.Api.Core.Controllers.Common;
|
||||
using Mediator;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.FileManagement.FileSystem.Queries;
|
||||
using Lumina.Application.Core.FileManagement.FileSystem.Queries.GetFileSysem;
|
||||
using Lumina.Presentation.Api.Core.Controllers.Common;
|
||||
using Mediator;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
using Lumina.Application.Core.FileManagement.Files.Queries;
|
||||
using Lumina.Application.Core.FileManagement.Files.Queries.GetFiles;
|
||||
using Lumina.Application.Core.FileManagement.Files.Queries.GetTreeFiles;
|
||||
using Lumina.Contracts.Responses.FileManagement;
|
||||
using Lumina.Presentation.Api.Common.ModelBinders;
|
||||
using Lumina.Presentation.Api.Core.Controllers.Common;
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Commands;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Queries;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Commands.CombinePath;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Commands.SplitPath;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Queries.CheckPathExists;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Queries.GetPathParent;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Queries.GetPathRoot;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Queries.GetPathSeparator;
|
||||
using Lumina.Application.Core.FileManagement.Paths.Queries.ValidatePath;
|
||||
using Lumina.Contracts.Responses.FileManagement;
|
||||
using Lumina.Presentation.Api.Common.ModelBinders;
|
||||
using Lumina.Presentation.Api.Core.Controllers.Common;
|
||||
using MapsterMapper;
|
||||
using Mediator;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries.GetBooks;
|
||||
using Lumina.Contracts.Requests.WrittenContentLibrary.BookLibrary;
|
||||
using Lumina.Presentation.Api.Core.Controllers.Common;
|
||||
using MapsterMapper;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ using ErrorOr;
|
||||
using FluentAssertions;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Books;
|
||||
using Lumina.Application.Common.DataAccess.UoW;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
using Lumina.Application.UnitTests.Common.Setup;
|
||||
using Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.Fixtures;
|
||||
using Lumina.Contracts.Enums.BookLibrary;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using FluentValidation.TestHelper;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
using Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.Fixtures;
|
||||
using Lumina.Contracts.Enums.BookLibrary;
|
||||
using Lumina.Domain.Common.Errors;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using AutoFixture;
|
||||
using Bogus;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
|
||||
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands.AddBook;
|
||||
using Lumina.Application.UnitTests.Common.Setup;
|
||||
using Lumina.Contracts.Enums.BookLibrary;
|
||||
using Lumina.Contracts.Models.Common;
|
||||
|
||||
Reference in new issue
Block a user