diff --git a/src/Lumina.Application/Common/Behaviors/ValidationBehavior.cs b/src/Lumina.Application/Common/Behaviors/ValidationBehavior.cs index 6f907331..05a2c53b 100644 --- a/src/Lumina.Application/Common/Behaviors/ValidationBehavior.cs +++ b/src/Lumina.Application/Common/Behaviors/ValidationBehavior.cs @@ -18,11 +18,8 @@ namespace Lumina.Application.Common.Behaviors; public class ValidationBehavior : IPipelineBehavior where TRequest : IRequest where TResponse : IErrorOr { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IValidator? _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +28,7 @@ public class ValidationBehavior : IPipelineBehavior /// Pipeline handler. Perform any additional behavior and await the delegate as necessary. /// @@ -56,5 +51,4 @@ public class ValidationBehavior : IPipelineBehaviorThe type of the value represented by the structure. public class OptionalJsonConverter : JsonConverter> { - #region ===================================================================== METHODS =================================================================================== /// /// Reads and converts the JSON to an instance of . /// @@ -42,5 +41,4 @@ public class OptionalJsonConverter : JsonConverter> else writer.WriteNullValue(); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/Converters/OptionalJsonConverterFactory.cs b/src/Lumina.Application/Common/Converters/OptionalJsonConverterFactory.cs index 54df5399..3bf7d378 100644 --- a/src/Lumina.Application/Common/Converters/OptionalJsonConverterFactory.cs +++ b/src/Lumina.Application/Common/Converters/OptionalJsonConverterFactory.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.Common.Converters; /// public class OptionalJsonConverterFactory : JsonConverterFactory { - #region ===================================================================== METHODS =================================================================================== /// /// Determines whether the converter can convert the specified type. /// @@ -36,5 +35,4 @@ public class OptionalJsonConverterFactory : JsonConverterFactory typeof(OptionalJsonConverter<>).MakeGenericType(valueType))!; return converter; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteAllRepositoryAction.cs b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteAllRepositoryAction.cs index 12e6f358..e72502cd 100644 --- a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteAllRepositoryAction.cs +++ b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteAllRepositoryAction.cs @@ -10,11 +10,9 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions; /// public interface IDeleteAllRepositoryAction { - #region ===================================================================== METHODS =================================================================================== /// /// Deletes all entities from the storage medium. /// /// An representing either a successfull operation, or an error. Task> DeleteAllAsync(); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteByIdRepositoryAction.cs b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteByIdRepositoryAction.cs index b2d4404a..7ff2e3a5 100644 --- a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteByIdRepositoryAction.cs +++ b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IDeleteByIdRepositoryAction.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions; /// The type used for the identifier of the respository. It should not be . public interface IDeleteByIdRepositoryAction where TId : notnull { - #region ===================================================================== METHODS =================================================================================== /// /// Deletes an element identified by from the storage medium. /// @@ -20,5 +19,4 @@ public interface IDeleteByIdRepositoryAction where TId : notnull /// Cancellation token that can be used to stop the execution. /// An representing either a successfull operation, or an error. Task> DeleteByIdAsync(TId id, CancellationToken cancellationToken); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetAllRepositoryAction.cs b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetAllRepositoryAction.cs index cfaac9a3..e30bbcc5 100644 --- a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetAllRepositoryAction.cs +++ b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetAllRepositoryAction.cs @@ -14,12 +14,10 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions; /// The type used as a result for the "get all" action. It should implement . public interface IGetAllRepositoryAction where TModel : IStorageEntity { - #region ===================================================================== METHODS =================================================================================== /// /// Gets all data of type from the storage medium. /// /// Cancellation token that can be used to stop the execution. /// An containing either a collection of , or an error. Task>> GetAllAsync(CancellationToken cancellationToken); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetByIdRepositoryAction.cs b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetByIdRepositoryAction.cs index 928109ff..7da7e057 100644 --- a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetByIdRepositoryAction.cs +++ b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IGetByIdRepositoryAction.cs @@ -15,7 +15,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions; public interface IGetByIdRepositoryAction where TModel : IStorageEntity where TId : notnull { - #region ===================================================================== METHODS =================================================================================== /// /// Gets an element of type identified by from the storage medium. /// @@ -23,5 +22,4 @@ public interface IGetByIdRepositoryAction where TModel : IStorageEn /// Cancellation token that can be used to stop the execution. /// An containing either a identified by , or an error. Task> GetByIdAsync(TId id, CancellationToken cancellationToken); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IInsertRepositoryAction.cs b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IInsertRepositoryAction.cs index 2d1ce4f2..3772cad2 100644 --- a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IInsertRepositoryAction.cs +++ b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IInsertRepositoryAction.cs @@ -13,7 +13,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions; /// The type used for the insert action. It should implement . public interface IInsertRepositoryAction where TModel : IStorageEntity { - #region ===================================================================== METHODS =================================================================================== /// /// Saves an element of type in the storage medium. /// @@ -21,5 +20,4 @@ public interface IInsertRepositoryAction where TModel : IStorageEntity /// Cancellation token that can be used to stop the execution. /// An representing either a successfull operation, or an error. Task> InsertAsync(TModel data, CancellationToken cancellationToken); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IUpdateRepositoryAction.cs b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IUpdateRepositoryAction.cs index ba908dce..fb315a88 100644 --- a/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IUpdateRepositoryAction.cs +++ b/src/Lumina.Application/Common/DataAccess/Repositories/Common/Actions/IUpdateRepositoryAction.cs @@ -13,7 +13,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions; /// The type used for the update action. It should implement . public interface IUpdateRepositoryAction where TModel : IStorageEntity { - #region ===================================================================== METHODS =================================================================================== /// /// Updates in the storage medium. /// @@ -21,5 +20,4 @@ public interface IUpdateRepositoryAction where TModel : IStorageEntity /// Cancellation token that can be used to stop the execution. /// An representing either a successfull operation, or an error. Task> UpdateAsync(TModel data, CancellationToken cancellationToken); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DataAccess/UoW/IUnitOfWork.cs b/src/Lumina.Application/Common/DataAccess/UoW/IUnitOfWork.cs index b5a45ec2..7de99390 100644 --- a/src/Lumina.Application/Common/DataAccess/UoW/IUnitOfWork.cs +++ b/src/Lumina.Application/Common/DataAccess/UoW/IUnitOfWork.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Common.DataAccess.UoW; /// public interface IUnitOfWork { - #region ===================================================================== METHODS =================================================================================== /// /// Exposes a repository of type to the Business Layer. /// @@ -33,5 +32,4 @@ public interface IUnitOfWork /// Commits a transaction. /// void CommitTransaction(); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs b/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs index 2c2b3de4..2c2ae7c9 100644 --- a/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs +++ b/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs @@ -14,7 +14,6 @@ namespace Lumina.Application.Common.DependencyInjection; /// public static class ApplicationLayerServices { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the services of the Application layer into the dependency injection container. /// @@ -42,5 +41,4 @@ public static class ApplicationLayerServices return services; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/Mapping/FileManagement/DirectoryMappingConfig.cs b/src/Lumina.Application/Common/Mapping/FileManagement/DirectoryMappingConfig.cs index 8bf54f3b..f06995e5 100644 --- a/src/Lumina.Application/Common/Mapping/FileManagement/DirectoryMappingConfig.cs +++ b/src/Lumina.Application/Common/Mapping/FileManagement/DirectoryMappingConfig.cs @@ -15,7 +15,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement; /// public class DirectoryMappingConfig : IRegister { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the mapping configuration. /// @@ -48,5 +47,4 @@ public class DirectoryMappingConfig : IRegister DateTime.Now )); } - #endregion } diff --git a/src/Lumina.Application/Common/Mapping/FileManagement/FileMappingConfig.cs b/src/Lumina.Application/Common/Mapping/FileManagement/FileMappingConfig.cs index 633bdc7d..1af19c28 100644 --- a/src/Lumina.Application/Common/Mapping/FileManagement/FileMappingConfig.cs +++ b/src/Lumina.Application/Common/Mapping/FileManagement/FileMappingConfig.cs @@ -11,7 +11,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement; /// public class FileMappingConfig : IRegister { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the mapping configuration. /// @@ -35,5 +34,4 @@ public class FileMappingConfig : IRegister src.Size )); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/Mapping/FileManagement/FileSystemTreeMappingConfig.cs b/src/Lumina.Application/Common/Mapping/FileManagement/FileSystemTreeMappingConfig.cs index f3219930..bde5226f 100644 --- a/src/Lumina.Application/Common/Mapping/FileManagement/FileSystemTreeMappingConfig.cs +++ b/src/Lumina.Application/Common/Mapping/FileManagement/FileSystemTreeMappingConfig.cs @@ -15,7 +15,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement; /// public class FileSystemTreeMappingConfig : IRegister { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the mapping configuration. /// @@ -63,5 +62,4 @@ public class FileSystemTreeMappingConfig : IRegister dest.Children = []; }); } - #endregion } diff --git a/src/Lumina.Application/Common/Mapping/FileManagement/PathSegmentMappingConfig.cs b/src/Lumina.Application/Common/Mapping/FileManagement/PathSegmentMappingConfig.cs index c49a5a05..bdf17a9c 100644 --- a/src/Lumina.Application/Common/Mapping/FileManagement/PathSegmentMappingConfig.cs +++ b/src/Lumina.Application/Common/Mapping/FileManagement/PathSegmentMappingConfig.cs @@ -11,7 +11,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement; /// public class PathSegmentMappingConfig : IRegister { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the mapping configuration. /// @@ -22,5 +21,4 @@ public class PathSegmentMappingConfig : IRegister .Map(dest => dest.Path, src => src.Name) .MapToConstructor(true); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Common/Mapping/FileManagement/ThumbnailMappingConfig.cs b/src/Lumina.Application/Common/Mapping/FileManagement/ThumbnailMappingConfig.cs index abc48722..d51d97ed 100644 --- a/src/Lumina.Application/Common/Mapping/FileManagement/ThumbnailMappingConfig.cs +++ b/src/Lumina.Application/Common/Mapping/FileManagement/ThumbnailMappingConfig.cs @@ -11,7 +11,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement; /// public class ThumbnailMappingConfig : IRegister { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the mapping configuration. /// @@ -23,5 +22,4 @@ public class ThumbnailMappingConfig : IRegister .Map(dest => dest.Bytes, src => src.Bytes) .MapToConstructor(true); } - #endregion } diff --git a/src/Lumina.Application/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs b/src/Lumina.Application/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs index 00ba4b88..03dd13d7 100644 --- a/src/Lumina.Application/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs +++ b/src/Lumina.Application/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs @@ -20,7 +20,6 @@ namespace Lumina.Application.Common.Mapping.WrittenContentLibrary.BookLibrary; /// public class BookMappingConfig : IRegister { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the mapping configuration. /// @@ -130,5 +129,4 @@ public class BookMappingConfig : IRegister ).Value).ToList() ).Value); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandler.cs index c78ffd6c..d182d486 100644 --- a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandler.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirector /// public class GetDirectoriesQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IDirectoryService _directoryService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class GetDirectoriesQueryHandler : IRequestHandler /// Gets the list of directories at the specified path. /// @@ -50,5 +45,4 @@ public class GetDirectoriesQueryHandler : IRequestHandler> result = _directoryService.GetSubdirectories(request.Path, request.IncludeHiddenElements); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map>(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidator.cs b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidator.cs index 35e8e3d2..96fe8a25 100644 --- a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirector /// public class GetDirectoriesQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class GetDirectoriesQueryValidator : AbstractValidator x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandler.cs index b723221f..cda64871 100644 --- a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandler.cs @@ -21,14 +21,11 @@ namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetDirector /// public class GetDirectoryTreeQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IDirectoryService _directoryService; private readonly IFileService _fileService; private readonly IPathService _pathService; private readonly IDriveService _driveService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -43,9 +40,7 @@ public class GetDirectoryTreeQueryHandler : IRequestHandler /// Gets the tree of expanded directories leading up to the requested path, with the additional list of drives, and children of the last child directory. /// @@ -182,5 +177,4 @@ public class GetDirectoryTreeQueryHandler : IRequestHandler public class GetDirectoryTreeQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class GetDirectoryTreeQueryValidator : AbstractValidator x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandler.cs index 029f9a58..6f301850 100644 --- a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandler.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetTreeDire /// public class GetTreeDirectoriesQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IDirectoryService _directoryService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class GetTreeDirectoriesQueryHandler : IRequestHandler /// Gets the list of directories at the specified path. /// @@ -50,5 +45,4 @@ public class GetTreeDirectoriesQueryHandler : IRequestHandler> result = _directoryService.GetSubdirectories(request.Path, request.IncludeHiddenElements); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map>(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidator.cs b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidator.cs index caa6cab3..7d2feb18 100644 --- a/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Directories.Queries.GetTreeDire /// public class GetTreeDirectoriesQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class GetTreeDirectoriesQueryValidator : AbstractValidator x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandler.cs index b7946e4e..5246948d 100644 --- a/src/Lumina.Application/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandler.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.Core.FileManagement.Drives.Queries.GetDrives; /// public class GetDrivesQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IDriveService _driveService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class GetDrivesQueryHandler : IRequestHandler /// Gets the list of file system drives. /// @@ -50,5 +45,4 @@ public class GetDrivesQueryHandler : IRequestHandler> result = _driveService.GetDrives(); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map>(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandler.cs index 2b5ac815..bba396b2 100644 --- a/src/Lumina.Application/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandler.cs @@ -13,11 +13,8 @@ namespace Lumina.Application.Core.FileManagement.FileSystem.Queries.GetFileSyste /// public class GetFileSystemQueryHandler : IRequestHandler { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPlatformContext _platformContext; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetFileSystemQueryHandler : IRequestHandler /// Gets the type of the file system. /// @@ -39,5 +34,4 @@ public class GetFileSystemQueryHandler : IRequestHandler public class GetFilesQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileService _fileService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class GetFilesQueryHandler : IRequestHandler /// Gets the list of files at the specified path. /// @@ -50,5 +45,4 @@ public class GetFilesQueryHandler : IRequestHandler> result = _fileService.GetFiles(request.Path, request.IncludeHiddenElements); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map>(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidator.cs b/src/Lumina.Application/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidator.cs index eb42f6fc..f832b1c3 100644 --- a/src/Lumina.Application/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Files.Queries.GetFiles; /// public class GetFilesQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class GetFilesQueryValidator : AbstractValidator { RuleFor(x => x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandler.cs index 09d3c486..b3263ad7 100644 --- a/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandler.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.Core.FileManagement.Files.Queries.GetTreeFiles; /// public class GetTreeFilesQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileService _fileService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class GetTreeFilesQueryHandler : IRequestHandler /// Gets the list of files at the specified path. /// @@ -50,5 +45,4 @@ public class GetTreeFilesQueryHandler : IRequestHandler> result = _fileService.GetFiles(request.Path, request.IncludeHiddenElements); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map>(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidator.cs b/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidator.cs index 6f616016..d3d2f073 100644 --- a/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Files.Queries.GetTreeFiles; /// public class GetTreeFilesQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class GetTreeFilesQueryValidator : AbstractValidator { RuleFor(x => x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandHandler.cs b/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandHandler.cs index 6af4bb5b..fee6ccc1 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandHandler.cs @@ -15,11 +15,8 @@ namespace Lumina.Application.Core.FileManagement.Paths.Commands.CombinePath; /// public class CombinePathCommandHandler : IRequestHandler> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _pathService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -28,9 +25,7 @@ public class CombinePathCommandHandler : IRequestHandler /// Combines two file system paths. /// @@ -44,5 +39,4 @@ public class CombinePathCommandHandler : IRequestHandler result = _pathService.CombinePath(request.OriginalPath, request.NewPath); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(new PathSegmentResponse(result.Value)), errors => errors)); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandValidator.cs b/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandValidator.cs index b5c61af2..b4d14759 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Commands/CombinePath/CombinePathCommandValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Paths.Commands.CombinePath; /// public class CombinePathCommandValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -19,5 +18,4 @@ public class CombinePathCommandValidator : AbstractValidator RuleFor(x => x.OriginalPath).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); RuleFor(x => x.NewPath).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandHandler.cs b/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandHandler.cs index b25c0a0f..505cd30c 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandHandler.cs @@ -17,12 +17,9 @@ namespace Lumina.Application.Core.FileManagement.Paths.Commands.SplitPath; /// public class SplitPathCommandHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _pathService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,9 +30,7 @@ public class SplitPathCommandHandler : IRequestHandler /// Gets the path components of the specified path. /// @@ -49,5 +44,4 @@ public class SplitPathCommandHandler : IRequestHandler> result = _pathService.ParsePath(request.Path); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map>(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandValidator.cs b/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandValidator.cs index 7e340dfc..28755b32 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Commands/SplitPath/SplitPathCommandValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Paths.Commands.SplitPath; /// public class SplitPathCommandValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class SplitPathCommandValidator : AbstractValidator { RuleFor(x => x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandler.cs index bd158ed2..0e7c3169 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandler.cs @@ -13,11 +13,8 @@ namespace Lumina.Application.Core.FileManagement.Paths.Queries.CheckPathExists; /// public class CheckPathExistsQueryHandler : IRequestHandler { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _pathService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class CheckPathExistsQueryHandler : IRequestHandler /// Checks the existence of the specified file system path. /// @@ -41,5 +36,4 @@ public class CheckPathExistsQueryHandler : IRequestHandler public class CheckPathExistsQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class CheckPathExistsQueryValidator : AbstractValidator x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandler.cs index f0b0ee24..80f18f34 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandler.cs @@ -17,12 +17,9 @@ namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathParent; /// public class GetPathParentQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _pathService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,9 +30,7 @@ public class GetPathParentQueryHandler : IRequestHandler /// Gets the parent of the specified file system path. /// @@ -49,5 +44,4 @@ public class GetPathParentQueryHandler : IRequestHandler> result = _pathService.GoUpOneLevel(request.Path); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map>(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidator.cs b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidator.cs index 455f4ff5..562a6ec0 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathParent; /// public class GetPathParentQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class GetPathParentQueryValidator : AbstractValidator { RuleFor(x => x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandler.cs index f5dd1050..047a3059 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandler.cs @@ -16,12 +16,9 @@ namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathRoot; /// public class GetPathRootQueryHandler : IRequestHandler> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _pathService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ public class GetPathRootQueryHandler : IRequestHandler /// Gets the root of the specified file system path. /// @@ -46,5 +41,4 @@ public class GetPathRootQueryHandler : IRequestHandler result = _pathService.GetPathRoot(request.Path); return ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidator.cs b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidator.cs index 71e9ee97..6d8ed642 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathRoot; /// public class GetPathRootQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class GetPathRootQueryValidator : AbstractValidator { RuleFor(x => x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathSeparator/GetPathSeparatorQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathSeparator/GetPathSeparatorQueryHandler.cs index fba05fae..8e4a94a1 100644 --- a/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathSeparator/GetPathSeparatorQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Paths/Queries/GetPathSeparator/GetPathSeparatorQueryHandler.cs @@ -13,11 +13,8 @@ namespace Lumina.Application.Core.FileManagement.Paths.Queries.GetPathSeparator; /// public class GetPathSeparatorQueryHandler : IRequestHandler { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _pathService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetPathSeparatorQueryHandler : IRequestHandler /// Gets the path separator character of a file system path. /// @@ -39,5 +34,4 @@ public class GetPathSeparatorQueryHandler : IRequestHandler public class ValidatePathQueryHandler : IRequestHandler { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _pathService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class ValidatePathQueryHandler : IRequestHandler /// Validates the specified file system path. /// @@ -41,5 +36,4 @@ public class ValidatePathQueryHandler : IRequestHandler public class ValidatePathQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class ValidatePathQueryValidator : AbstractValidator { RuleFor(x => x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandler.cs b/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandler.cs index 53541a68..e4ed3df4 100644 --- a/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandler.cs +++ b/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandler.cs @@ -16,12 +16,9 @@ namespace Lumina.Application.Core.FileManagement.Thumbnails.Queries.GetThumbnail /// public class GetThumbnailQueryHandler : IRequestHandler> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IThumbnailService _thumbnailsService; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ public class GetThumbnailQueryHandler : IRequestHandler /// Gets the thumbnail for a file located at the specified path, with the specified quality. /// @@ -46,5 +41,4 @@ public class GetThumbnailQueryHandler : IRequestHandler result = await _thumbnailsService.GetThumbnailAsync(request.Path, request.Quality, cancellationToken); return await ValueTask.FromResult(result.Match(values => ErrorOrFactory.From(_mapper.Map(values)), errors => errors)); } - #endregion } diff --git a/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidator.cs b/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidator.cs index 0fe2446d..5f90cde8 100644 --- a/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidator.cs +++ b/src/Lumina.Application/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Application.Core.FileManagement.Thumbnails.Queries.GetThumbnail /// public class GetThumbnailQueryValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -19,5 +18,4 @@ public class GetThumbnailQueryValidator : AbstractValidator RuleFor(x => x.Path).NotEmpty().WithMessage(Errors.FileManagement.PathCannotBeEmpty.Code); RuleFor(x => x.Quality).InclusiveBetween(0, 100).WithMessage(Errors.Thumbnails.ImageQaulityMustBeBetweenZeroAndOneHundred.Code); } - #endregion } diff --git a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandler.cs b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandler.cs index 199eece2..6134d50e 100644 --- a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandler.cs +++ b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandler.cs @@ -27,12 +27,9 @@ namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Comma /// public class AddBookCommandHandler : IRequestHandler> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IUnitOfWork _unitOfWork; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -43,9 +40,7 @@ public class AddBookCommandHandler : IRequestHandler /// Handles the command to add a book. /// @@ -176,5 +171,4 @@ public class AddBookCommandHandler : IRequestHandler public class AddBookCommandValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -211,5 +210,4 @@ public class AddBookCommandValidator : AbstractValidator .WithMessage(Errors.Metadata.RatingVoteCountMustBePositive.Code); }); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooks/GetBooksQueryHandler.cs b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooks/GetBooksQueryHandler.cs index 5eb3a406..65d3b556 100644 --- a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooks/GetBooksQueryHandler.cs +++ b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooks/GetBooksQueryHandler.cs @@ -18,11 +18,8 @@ namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queri /// public class GetBooksQueryHandler : IRequestHandler>> { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IUnitOfWork _unitOfWork; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +28,7 @@ public class GetBooksQueryHandler : IRequestHandler /// Handles the query to get all books. /// @@ -48,5 +43,4 @@ public class GetBooksQueryHandler : IRequestHandler> getBooksResult = await bookRepository.GetAllAsync(cancellationToken).ConfigureAwait(false); return getBooksResult.Match(values => ErrorOrFactory.From(values.Adapt>()), errors => errors); } - #endregion } diff --git a/src/Lumina.Contracts/Models/Common/IStorageEntity.cs b/src/Lumina.Contracts/Models/Common/IStorageEntity.cs index d326d792..a35d558f 100644 --- a/src/Lumina.Contracts/Models/Common/IStorageEntity.cs +++ b/src/Lumina.Contracts/Models/Common/IStorageEntity.cs @@ -9,7 +9,6 @@ namespace Lumina.Contracts.Models.Common; /// public interface IStorageEntity { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the identifier of the entity. /// @@ -24,5 +23,4 @@ public interface IStorageEntity /// The time and date when the entity was updated. /// DateTime? Updated { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Contracts/Models/FileManagement/FileSystemItemModel.cs b/src/Lumina.Contracts/Models/FileManagement/FileSystemItemModel.cs index 3267f046..fa9ef765 100644 --- a/src/Lumina.Contracts/Models/FileManagement/FileSystemItemModel.cs +++ b/src/Lumina.Contracts/Models/FileManagement/FileSystemItemModel.cs @@ -1,4 +1,4 @@ -#region ========================================================================= USING ===================================================================================== +#region ========================================================================= USING ===================================================================================== using System; using System.Diagnostics; #endregion @@ -13,4 +13,9 @@ namespace Lumina.Contracts.Models.FileManagement; /// The creation date of the file system item. /// The modification date of the file system item. [DebuggerDisplay("{Name}")] -public record FileSystemItemModel(string Path, string Name, DateTime DateCreated, DateTime DateModified); \ No newline at end of file +public record FileSystemItemModel( + string Path, + string Name, + DateTime DateCreated, + DateTime DateModified +); diff --git a/src/Lumina.Contracts/Models/WrittenContentLibrary/BookLibrary/BookModel.cs b/src/Lumina.Contracts/Models/WrittenContentLibrary/BookLibrary/BookModel.cs index 2320c929..1155fdb8 100644 --- a/src/Lumina.Contracts/Models/WrittenContentLibrary/BookLibrary/BookModel.cs +++ b/src/Lumina.Contracts/Models/WrittenContentLibrary/BookLibrary/BookModel.cs @@ -13,7 +13,6 @@ namespace Lumina.Contracts.Models.WrittenContentLibrary.BookLibrary; [DebuggerDisplay("{Title}")] public class BookModel : IStorageEntity { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the Id of the media item. /// @@ -204,5 +203,4 @@ public class BookModel : IStorageEntity /// Gets the optional time and date when the entity was updated. /// public DateTime? Updated { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Contracts/Responses/FileManagement/DirectoryResponse.cs b/src/Lumina.Contracts/Responses/FileManagement/DirectoryResponse.cs index e518a7b9..ef25f547 100644 --- a/src/Lumina.Contracts/Responses/FileManagement/DirectoryResponse.cs +++ b/src/Lumina.Contracts/Responses/FileManagement/DirectoryResponse.cs @@ -1,4 +1,4 @@ -#region ========================================================================= USING ===================================================================================== +#region ========================================================================= USING ===================================================================================== using Lumina.Contracts.Models.FileManagement; using System; using System.Collections.Generic; @@ -16,4 +16,10 @@ namespace Lumina.Contracts.Responses.FileManagement; /// The modification date of the directory. /// The children items of the directory. [DebuggerDisplay("{Name} (Directory)")] -public record DirectoryResponse(string Path, string Name, DateTime DateCreated, DateTime DateModified, List Items) : FileSystemItemModel(Path, Name, DateCreated, DateModified); \ No newline at end of file +public record DirectoryResponse( + string Path, + string Name, + DateTime DateCreated, + DateTime DateModified, + List Items +) : FileSystemItemModel(Path, Name, DateCreated, DateModified); diff --git a/src/Lumina.Contracts/Responses/FileManagement/FileResponse.cs b/src/Lumina.Contracts/Responses/FileManagement/FileResponse.cs index 968317de..61fe82c3 100644 --- a/src/Lumina.Contracts/Responses/FileManagement/FileResponse.cs +++ b/src/Lumina.Contracts/Responses/FileManagement/FileResponse.cs @@ -1,4 +1,4 @@ -#region ========================================================================= USING ===================================================================================== +#region ========================================================================= USING ===================================================================================== using Lumina.Contracts.Models.FileManagement; using System; using System.Diagnostics; @@ -15,4 +15,10 @@ namespace Lumina.Contracts.Responses.FileManagement; /// The modification date of the file. /// The size of the file, in bytes. [DebuggerDisplay("{Name} (File, Size: {Size} bytes)")] -public record FileResponse(string Path, string Name, DateTime DateCreated, DateTime DateModified, long Size) : FileSystemItemModel(Path, Name, DateCreated, DateModified); \ No newline at end of file +public record FileResponse( + string Path, + string Name, + DateTime DateCreated, + DateTime DateModified, + long Size +) : FileSystemItemModel(Path, Name, DateCreated, DateModified); diff --git a/src/Lumina.Contracts/Responses/FileManagement/FileSystemTreeNodeResponse.cs b/src/Lumina.Contracts/Responses/FileManagement/FileSystemTreeNodeResponse.cs index 698a3b6a..d2ac28b4 100644 --- a/src/Lumina.Contracts/Responses/FileManagement/FileSystemTreeNodeResponse.cs +++ b/src/Lumina.Contracts/Responses/FileManagement/FileSystemTreeNodeResponse.cs @@ -12,7 +12,6 @@ namespace Lumina.Contracts.Responses.FileManagement; [DebuggerDisplay("{Path}")] public class FileSystemTreeNodeResponse { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the full path of the file or directory. /// @@ -42,5 +41,4 @@ public class FileSystemTreeNodeResponse /// Gets or sets the list of child nodes. /// public List Children { get; set; } = []; - #endregion } \ No newline at end of file diff --git a/src/Lumina.Contracts/Responses/FileManagement/ThumbnailResponse.cs b/src/Lumina.Contracts/Responses/FileManagement/ThumbnailResponse.cs index 1ab5d184..e1a68ca7 100644 --- a/src/Lumina.Contracts/Responses/FileManagement/ThumbnailResponse.cs +++ b/src/Lumina.Contracts/Responses/FileManagement/ThumbnailResponse.cs @@ -11,4 +11,7 @@ namespace Lumina.Contracts.Responses.FileManagement; /// The type of the thumbnail image. /// The bytes representing the thumbail. [DebuggerDisplay("{Type}")] -public record ThumbnailResponse(ImageType Type, byte[] Bytes); +public record ThumbnailResponse( + ImageType Type, + byte[] Bytes +); diff --git a/src/Lumina.DataAccess/Common/Configuration/BookConfiguration.cs b/src/Lumina.DataAccess/Common/Configuration/BookConfiguration.cs index 8f6505e0..13f380ff 100644 --- a/src/Lumina.DataAccess/Common/Configuration/BookConfiguration.cs +++ b/src/Lumina.DataAccess/Common/Configuration/BookConfiguration.cs @@ -13,7 +13,6 @@ namespace Lumina.DataAccess.Common.Configuration; /// public class BookConfiguration : IEntityTypeConfiguration { - #region ===================================================================== METHODS =================================================================================== /// /// Configures the entity. /// @@ -148,7 +147,6 @@ public class BookConfiguration : IEntityTypeConfiguration .IsRequired(); }); } - #endregion } //public class ContributorConfiguration : IEntityTypeConfiguration diff --git a/src/Lumina.DataAccess/Common/Configuration/GenreConfiguration.cs b/src/Lumina.DataAccess/Common/Configuration/GenreConfiguration.cs index 0e2f1158..3a50847e 100644 --- a/src/Lumina.DataAccess/Common/Configuration/GenreConfiguration.cs +++ b/src/Lumina.DataAccess/Common/Configuration/GenreConfiguration.cs @@ -11,7 +11,6 @@ namespace Lumina.DataAccess.Common.Configuration; /// public class GenreConfiguration : IEntityTypeConfiguration { - #region ===================================================================== METHODS =================================================================================== /// /// Configures the entity. /// @@ -22,5 +21,4 @@ public class GenreConfiguration : IEntityTypeConfiguration builder.HasKey(genre => genre.Name); builder.Property(genre => genre.Name).IsRequired().HasMaxLength(50); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.DataAccess/Common/Configuration/TagConfiguration.cs b/src/Lumina.DataAccess/Common/Configuration/TagConfiguration.cs index 2cfb2b1b..5695a09b 100644 --- a/src/Lumina.DataAccess/Common/Configuration/TagConfiguration.cs +++ b/src/Lumina.DataAccess/Common/Configuration/TagConfiguration.cs @@ -11,7 +11,6 @@ namespace Lumina.DataAccess.Common.Configuration; /// public class TagConfiguration : IEntityTypeConfiguration { - #region ===================================================================== METHODS =================================================================================== /// /// Configures the entity. /// @@ -22,5 +21,4 @@ public class TagConfiguration : IEntityTypeConfiguration builder.HasKey(tag => tag.Name); builder.Property(tag => tag.Name).IsRequired().HasMaxLength(50); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.DataAccess/Common/DependencyInjection/DataAccessLayerServices.cs b/src/Lumina.DataAccess/Common/DependencyInjection/DataAccessLayerServices.cs index 4259b942..bc5fd532 100644 --- a/src/Lumina.DataAccess/Common/DependencyInjection/DataAccessLayerServices.cs +++ b/src/Lumina.DataAccess/Common/DependencyInjection/DataAccessLayerServices.cs @@ -19,7 +19,6 @@ namespace Lumina.DataAccess.Common.DependencyInjection; /// public static class DataAccessLayerServices { - #region ===================================================================== METHODS =================================================================================== /// /// Extension method for adding the DataAccess layer services to the DI container. /// @@ -57,5 +56,4 @@ public static class DataAccessLayerServices .First(), type); } } - #endregion } diff --git a/src/Lumina.DataAccess/Core/Repositories/Books/BookRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Books/BookRepository.cs index 6d95f703..db3d2cac 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Books/BookRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Books/BookRepository.cs @@ -19,11 +19,8 @@ namespace Lumina.DataAccess.Core.Repositories.Books; /// internal sealed class BookRepository : IBookRepository { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly LuminaDbContext _luminaDbContext; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ internal sealed class BookRepository : IBookRepository { _luminaDbContext = luminaDbContext; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Adds a new book. /// @@ -77,5 +72,4 @@ internal sealed class BookRepository : IBookRepository .Include(book => book.ISBNs) .ToListAsync(cancellationToken).ConfigureAwait(false); } - #endregion } diff --git a/src/Lumina.DataAccess/Core/Repositories/Common/Factory/IRepositoryFactory.cs b/src/Lumina.DataAccess/Core/Repositories/Common/Factory/IRepositoryFactory.cs index 5903316c..e2c4608b 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Common/Factory/IRepositoryFactory.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Common/Factory/IRepositoryFactory.cs @@ -5,12 +5,10 @@ /// public interface IRepositoryFactory { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new repository of type . /// /// The type of repository to create. /// A repository of type . TResult CreateRepository() where TResult : notnull; - #endregion } \ No newline at end of file diff --git a/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryDictionary.cs b/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryDictionary.cs index 42b4dd82..b7149dca 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryDictionary.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryDictionary.cs @@ -12,18 +12,13 @@ namespace Lumina.DataAccess.Core.Repositories.Common.Factory; /// public class RepositoryDictionary { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List> _container = []; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the number of added repositories. /// public int Count => _container.Count; - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Resets the collection of repositories. /// @@ -66,5 +61,4 @@ public class RepositoryDictionary { return (TResult)_container.FirstOrDefault(e => e.Key == key).Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryFactory.cs b/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryFactory.cs index cf257b41..f18e6c09 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryFactory.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Common/Factory/RepositoryFactory.cs @@ -10,11 +10,8 @@ namespace Lumina.DataAccess.Core.Repositories.Common.Factory; /// public class RepositoryFactory : IRepositoryFactory { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IServiceProvider _serviceProvider; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -23,9 +20,7 @@ public class RepositoryFactory : IRepositoryFactory { _serviceProvider = serviceProvider; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new repository of type . /// @@ -36,5 +31,4 @@ public class RepositoryFactory : IRepositoryFactory { return _serviceProvider.GetRequiredService() ?? throw new ArgumentException(); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs b/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs index a5c321df..75fe68d8 100644 --- a/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs +++ b/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs @@ -18,11 +18,8 @@ namespace Lumina.DataAccess.Core.UoW; /// To update the database: update-database -p Lumina.DataAccess -s Lumina.Presentation.Api public class LuminaDbContext : DbContext { - #region ==================================================================== PROPERTIES ================================================================================= public virtual DbSet Books { get; set; } = null!; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class LuminaDbContext : DbContext public LuminaDbContext(DbContextOptions options) : base(options) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Configures the entity mappings for the database context. /// @@ -67,5 +62,4 @@ public class LuminaDbContext : DbContext } return base.SaveChanges(); } - #endregion } diff --git a/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs b/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs index 57aa02e3..e6b933f8 100644 --- a/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs +++ b/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs @@ -17,19 +17,14 @@ namespace Lumina.DataAccess.Core.UoW; /// public class UnitOfWork : IUnitOfWork { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly LuminaDbContext _luminaDbContext; private readonly IRepositoryFactory _repositoryFactory; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the collection of available repositories. /// internal RepositoryDictionary Repositories { get; private set; } = new RepositoryDictionary(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -41,9 +36,7 @@ public class UnitOfWork : IUnitOfWork _luminaDbContext = luminaDbContext; AddRepositories(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Adds all the repositories from the Data Access Layer so that they can be exposed to the Business Layer. /// @@ -121,5 +114,4 @@ public class UnitOfWork : IUnitOfWork { throw new NotImplementedException(); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/DependencyInjection/DomainLayerServices.cs b/src/Lumina.Domain/Common/DependencyInjection/DomainLayerServices.cs index d662bad7..720bf3ea 100644 --- a/src/Lumina.Domain/Common/DependencyInjection/DomainLayerServices.cs +++ b/src/Lumina.Domain/Common/DependencyInjection/DomainLayerServices.cs @@ -16,7 +16,6 @@ namespace Lumina.Domain.Common.DependencyInjection; /// public static class DomainLayerServices { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the services of the Domain layer into the dependency injection container. /// @@ -44,5 +43,4 @@ public static class DomainLayerServices services.AddSingleton(); return services; } - #endregion } diff --git a/src/Lumina.Domain/Common/Errors/Errors.FileManagement.cs b/src/Lumina.Domain/Common/Errors/Errors.FileManagement.cs index 40ce7831..eeef6155 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.FileManagement.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.FileManagement.cs @@ -11,7 +11,6 @@ public static partial class Errors { public static class FileManagement { - #region ==================================================================== PROPERTIES ================================================================================= public static Error ParentNodeCannotBeNull => Error.Failure(nameof(ParentNodeCannotBeNull)); public static Error FileCopyError => Error.Failure(nameof(FileCopyError)); public static Error FileMoveError => Error.Failure(nameof(FileMoveError)); @@ -29,6 +28,5 @@ public static partial class Errors public static Error FileAlreadyExists => Error.Conflict(nameof(FileAlreadyExists)); public static Error DirectoryNotFound => Error.NotFound(nameof(DirectoryNotFound)); public static Error DirectoryAlreadyExists => Error.Conflict(nameof(DirectoryAlreadyExists)); - #endregion } -} \ No newline at end of file +} diff --git a/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs b/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs index 7882132b..9f117b48 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs @@ -10,9 +10,7 @@ namespace Lumina.Domain.Common.Errors; public static partial class Errors { public static class MediaContributor - { - #region ==================================================================== PROPERTIES ================================================================================= - + { public static Error ContributorsListCannotBeNull => Error.Validation(nameof(ContributorsListCannotBeNull)); public static Error ContributorNameCannotBeEmpty => Error.Validation(nameof(ContributorNameCannotBeEmpty)); public static Error ContributorDisplayNameCannotBeEmpty => Error.Validation(nameof(ContributorDisplayNameCannotBeEmpty)); @@ -23,6 +21,5 @@ public static partial class Errors public static Error RoleCategoryCannotBeEmpty => Error.Validation(nameof(RoleCategoryCannotBeEmpty)); public static Error RoleCategoryMustBeMaximum50CharactersLong => Error.Validation(nameof(RoleCategoryMustBeMaximum50CharactersLong)); public static Error ContributorRoleCannotBeNull => Error.Validation(nameof(ContributorRoleCannotBeNull)); - #endregion } -} \ No newline at end of file +} diff --git a/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs b/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs index 2883a3e9..8937c7fa 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs @@ -11,7 +11,6 @@ public static partial class Errors { public static class Metadata { - #region ==================================================================== PROPERTIES ================================================================================= public static Error MetadataCannotBeNull => Error.Validation(nameof(MetadataCannotBeNull)); public static Error TitleCannotBeEmpty => Error.Validation(nameof(TitleCannotBeEmpty)); public static Error TitleMustBeMaximum255CharactersLong => Error.Validation(nameof(TitleMustBeMaximum255CharactersLong)); @@ -43,6 +42,5 @@ public static partial class Errors public static Error RatingVoteCountMustBePositive => Error.Validation(nameof(RatingVoteCountMustBePositive)); public static Error RatingsListCannotBeNull => Error.Validation(nameof(RatingsListCannotBeNull)); public static Error InvalidIsoCode => Error.Validation(nameof(InvalidIsoCode)); - #endregion } -} \ No newline at end of file +} diff --git a/src/Lumina.Domain/Common/Errors/Errors.Permission.cs b/src/Lumina.Domain/Common/Errors/Errors.Permission.cs index 5caaa027..8b929a38 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Permission.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Permission.cs @@ -1,4 +1,4 @@ -#region ========================================================================= USING ===================================================================================== +#region ========================================================================= USING ===================================================================================== using ErrorOr; #endregion @@ -11,8 +11,6 @@ public static partial class Errors { public static class Permission { - #region ==================================================================== PROPERTIES ================================================================================= public static Error UnauthorizedAccess => Error.Failure(nameof(UnauthorizedAccess)); - #endregion } -} \ No newline at end of file +} diff --git a/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs b/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs index 4bcf43af..235ffb31 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs @@ -11,9 +11,7 @@ public static partial class Errors { public static class Thumbnails { - #region ==================================================================== PROPERTIES ================================================================================= public static Error NoThumbnail => Error.Failure(nameof(NoThumbnail)); public static Error ImageQaulityMustBeBetweenZeroAndOneHundred => Error.Validation(nameof(ImageQaulityMustBeBetweenZeroAndOneHundred)); - #endregion } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs b/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs index 9cd2cebb..fc2dc493 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs @@ -11,7 +11,6 @@ public static partial class Errors { public static class WrittenContent { - #region ==================================================================== PROPERTIES ================================================================================= public static Error BookAlreadyExists => Error.Conflict(nameof(BookAlreadyExists)); public static Error IsbnValueCannotBeEmpty => Error.Validation(nameof(IsbnValueCannotBeEmpty)); public static Error IsbnListCannotBeNull => Error.Validation(nameof(IsbnListCannotBeNull)); @@ -36,6 +35,5 @@ public static partial class Errors public static Error UnknownBookFormat => Error.Validation(nameof(UnknownBookFormat)); public static Error EditionMustBeMaximum50CharactersLong => Error.Validation(nameof(EditionMustBeMaximum50CharactersLong)); public static Error VolumeNumberMustBeGreaterThanZero => Error.Validation(nameof(VolumeNumberMustBeGreaterThanZero)); - #endregion } -} \ No newline at end of file +} diff --git a/src/Lumina.Domain/Common/Events/IDomainEvent.cs b/src/Lumina.Domain/Common/Events/IDomainEvent.cs index 01947f30..58265749 100644 --- a/src/Lumina.Domain/Common/Events/IDomainEvent.cs +++ b/src/Lumina.Domain/Common/Events/IDomainEvent.cs @@ -9,7 +9,6 @@ namespace Lumina.Domain.Common.Events; /// public interface IDomainEvent { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the id of the domain event. /// @@ -19,5 +18,4 @@ public interface IDomainEvent /// Gets the date and time when the domain event occurred. /// DateTime OccurredOn { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs b/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs index c7bfe993..37ff7de2 100644 --- a/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs +++ b/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs @@ -6,7 +6,6 @@ /// The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type. public abstract class AggregateRoot : Entity where TId : notnull { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -25,5 +24,4 @@ public abstract class AggregateRoot : Entity where TId : notnull } #pragma warning restore CS8618 - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/Models/Core/Entity.cs b/src/Lumina.Domain/Common/Models/Core/Entity.cs index 1aa36737..3d02e721 100644 --- a/src/Lumina.Domain/Common/Models/Core/Entity.cs +++ b/src/Lumina.Domain/Common/Models/Core/Entity.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Common.Models.Core; /// The type representing the unique identifier for the Entity. It should be a non-nullable type. public abstract class Entity : IEquatable> where TId : notnull { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the unique identifier of the entity. /// @@ -25,9 +24,7 @@ public abstract class Entity : IEquatable> where TId : notnull /// Gets the date and time when the entity was last updated. /// public DateTime? Updated { get; set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -46,9 +43,7 @@ public abstract class Entity : IEquatable> where TId : notnull } #pragma warning restore CS8618 - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Indicates whether the current object is equal to another object of the same type. /// @@ -99,5 +94,4 @@ public abstract class Entity : IEquatable> where TId : notnull { return Id.GetHashCode(); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/Models/Core/EntityId.cs b/src/Lumina.Domain/Common/Models/Core/EntityId.cs index 1e64c714..6829479c 100644 --- a/src/Lumina.Domain/Common/Models/Core/EntityId.cs +++ b/src/Lumina.Domain/Common/Models/Core/EntityId.cs @@ -12,14 +12,11 @@ namespace Lumina.Domain.Common.Models.Core; [DebuggerDisplay("{Value}")] public abstract class EntityId : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the value representing the entity identifier. /// public TId Value { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -37,9 +34,7 @@ public abstract class EntityId : ValueObject { } #pragma warning restore CS8618 - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the list of items that define equality of the object. /// @@ -57,5 +52,4 @@ public abstract class EntityId : ValueObject { return Value?.ToString() ?? base.ToString(); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/Models/Core/ValueObject.cs b/src/Lumina.Domain/Common/Models/Core/ValueObject.cs index 6b942b2a..a49a629b 100644 --- a/src/Lumina.Domain/Common/Models/Core/ValueObject.cs +++ b/src/Lumina.Domain/Common/Models/Core/ValueObject.cs @@ -11,7 +11,6 @@ namespace Lumina.Domain.Common.Models.Core; /// public abstract class ValueObject : IEquatable { - #region ===================================================================== METHODS =================================================================================== /// /// Gets the list of items that define equality of the object. /// @@ -72,5 +71,4 @@ public abstract class ValueObject : IEquatable return GetEqualityComponents().Select(x => x?.GetHashCode() ?? 0) .Aggregate((x, y) => x ^ y); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/Primitives/Optional.cs b/src/Lumina.Domain/Common/Primitives/Optional.cs index 28b60d10..b6eb32ba 100644 --- a/src/Lumina.Domain/Common/Primitives/Optional.cs +++ b/src/Lumina.Domain/Common/Primitives/Optional.cs @@ -7,11 +7,8 @@ namespace Lumina.Domain.Common.Primitives; /// The type of the value represented by this structure. public readonly struct Optional { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly TValue? _value; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets a value indicating whether this structure has a value. /// @@ -21,9 +18,7 @@ public readonly struct Optional /// Gets the value represented by this structure. /// public TValue Value => HasValue ? _value! : default!; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the structure. /// @@ -34,9 +29,7 @@ public readonly struct Optional _value = value; HasValue = hasValue; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Custom implementation operator for converting to an . /// @@ -94,5 +87,4 @@ public readonly struct Optional { return HasValue ? Value?.ToString()! : string.Empty; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/ValueObjects/Metadata/BaseMetadata.cs b/src/Lumina.Domain/Common/ValueObjects/Metadata/BaseMetadata.cs index 8c94ebd3..585f5453 100644 --- a/src/Lumina.Domain/Common/ValueObjects/Metadata/BaseMetadata.cs +++ b/src/Lumina.Domain/Common/ValueObjects/Metadata/BaseMetadata.cs @@ -14,12 +14,9 @@ namespace Lumina.Domain.Common.ValueObjects.Metadata; [DebuggerDisplay("{Title}")] public abstract class BaseMetadata : ValueObject { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _tags; private readonly List _genres; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the title of the media item. /// @@ -59,9 +56,7 @@ public abstract class BaseMetadata : ValueObject /// Gets the list of genres associated with the media item. /// public IReadOnlyCollection Genres => _genres.AsReadOnly(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -93,9 +88,7 @@ public abstract class BaseMetadata : ValueObject Language = language; OriginalLanguage = originalLanguage; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// public override IEnumerable GetEqualityComponents() { @@ -110,5 +103,4 @@ public abstract class BaseMetadata : ValueObject yield return Language; yield return OriginalLanguage; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/ValueObjects/Metadata/Genre.cs b/src/Lumina.Domain/Common/ValueObjects/Metadata/Genre.cs index bf950822..0e093b1f 100644 --- a/src/Lumina.Domain/Common/ValueObjects/Metadata/Genre.cs +++ b/src/Lumina.Domain/Common/ValueObjects/Metadata/Genre.cs @@ -13,14 +13,11 @@ namespace Lumina.Domain.Common.ValueObjects.Metadata; [DebuggerDisplay("{Name}")] public class Genre : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the genre element of the media item. /// public string Name { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class Genre : ValueObject { Name = name.Trim(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -60,5 +55,4 @@ public class Genre : ValueObject { return Name; } - #endregion } diff --git a/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs b/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs index 7f08462c..05204fc0 100644 --- a/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs +++ b/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs @@ -14,7 +14,6 @@ namespace Lumina.Domain.Common.ValueObjects.Metadata; [DebuggerDisplay("{LanguageCode}")] public class LanguageInfo : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the ISO 639-1 two-letter language code. /// @@ -29,9 +28,7 @@ public class LanguageInfo : ValueObject /// Gets an optional native name of the language. /// public Optional NativeName { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -44,9 +41,7 @@ public class LanguageInfo : ValueObject LanguageName = languageName; NativeName = nativeName; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -83,5 +78,4 @@ public class LanguageInfo : ValueObject { return $"{LanguageCode} - {LanguageName}"; } - #endregion } diff --git a/src/Lumina.Domain/Common/ValueObjects/Metadata/Rating.cs b/src/Lumina.Domain/Common/ValueObjects/Metadata/Rating.cs index e444494a..55a0601a 100644 --- a/src/Lumina.Domain/Common/ValueObjects/Metadata/Rating.cs +++ b/src/Lumina.Domain/Common/ValueObjects/Metadata/Rating.cs @@ -12,7 +12,6 @@ namespace Lumina.Domain.Common.ValueObjects.Metadata; [DebuggerDisplay("{Value}/{MaxValue}")] public abstract class Rating : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the numeric value of the rating. /// @@ -27,9 +26,7 @@ public abstract class Rating : ValueObject /// Gets the optional number of votes or reviews this rating is based on. /// public Optional VoteCount { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -42,9 +39,7 @@ public abstract class Rating : ValueObject MaxValue = maxValue; VoteCount = voteCount; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Returns the rating as a percentage. /// @@ -53,5 +48,4 @@ public abstract class Rating : ValueObject { return Value / MaxValue * 100; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/ValueObjects/Metadata/ReleaseInfo.cs b/src/Lumina.Domain/Common/ValueObjects/Metadata/ReleaseInfo.cs index 075f15c1..5056487d 100644 --- a/src/Lumina.Domain/Common/ValueObjects/Metadata/ReleaseInfo.cs +++ b/src/Lumina.Domain/Common/ValueObjects/Metadata/ReleaseInfo.cs @@ -15,7 +15,6 @@ namespace Lumina.Domain.Common.ValueObjects.Metadata; [DebuggerDisplay("{ReleaseYear}")] public class ReleaseInfo : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the optional original release date of the media item. /// @@ -46,9 +45,7 @@ public class ReleaseInfo : ValueObject /// Gets the optional release version or edition. (e.g. "Original", "Director's Cut", "2.0") /// public Optional ReleaseVersion { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -73,9 +70,7 @@ public class ReleaseInfo : ValueObject ReleaseCountry = releaseCountry; ReleaseVersion = releaseVersion; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -117,5 +112,4 @@ public class ReleaseInfo : ValueObject yield return ReleaseCountry; yield return ReleaseVersion; } - #endregion } diff --git a/src/Lumina.Domain/Common/ValueObjects/Metadata/Tag.cs b/src/Lumina.Domain/Common/ValueObjects/Metadata/Tag.cs index bdc734cf..5af8c978 100644 --- a/src/Lumina.Domain/Common/ValueObjects/Metadata/Tag.cs +++ b/src/Lumina.Domain/Common/ValueObjects/Metadata/Tag.cs @@ -13,14 +13,11 @@ namespace Lumina.Domain.Common.ValueObjects.Metadata; [DebuggerDisplay("{Name}")] public class Tag : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the tag element of the media item. /// public string Name { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class Tag : ValueObject { Name = name.Trim(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -60,5 +55,4 @@ public class Tag : ValueObject { return Name; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/AudioLibrary/AudioLibraryAggregate/ValueObjects/AudioMetadata.cs b/src/Lumina.Domain/Core/Aggregates/AudioLibrary/AudioLibraryAggregate/ValueObjects/AudioMetadata.cs index 4da5b369..90cd02ae 100644 --- a/src/Lumina.Domain/Core/Aggregates/AudioLibrary/AudioLibraryAggregate/ValueObjects/AudioMetadata.cs +++ b/src/Lumina.Domain/Core/Aggregates/AudioLibrary/AudioLibraryAggregate/ValueObjects/AudioMetadata.cs @@ -14,7 +14,6 @@ namespace Lumina.Domain.Core.Aggregates.AudioLibrary.AudioLibraryAggregate.Value [DebuggerDisplay("{Title}")] public class AudioMetadata : BaseMetadata { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the duration of the video in seconds. /// @@ -44,9 +43,7 @@ public class AudioMetadata : BaseMetadata /// Gets the bitrate of the audio in kbps. /// public Optional Bitrate { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -87,9 +84,7 @@ public class AudioMetadata : BaseMetadata AudioCodec = audioCodec; Bitrate = bitrate; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -155,5 +150,4 @@ public class AudioMetadata : BaseMetadata yield return AudioCodec; yield return Bitrate; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/Directory.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/Directory.cs index 80f8fc71..26c725e2 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/Directory.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/Directory.cs @@ -16,11 +16,8 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.E [DebuggerDisplay("{Id.Path}")] public sealed class Directory : FileSystemItem { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _items = []; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the creation date of the file system item. Can be optional if the information is not available. /// @@ -35,9 +32,7 @@ public sealed class Directory : FileSystemItem /// Gets the collection of file system items that are children to the current directory entity. /// public IReadOnlyCollection Items => _items.AsReadOnly(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -50,9 +45,7 @@ public sealed class Directory : FileSystemItem DateCreated = dateCreated; DateModified = dateModified; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -146,5 +139,4 @@ public sealed class Directory : FileSystemItem _items.Remove(item); return Result.Updated; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/File.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/File.cs index 1be10f2f..b2a01e1f 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/File.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/File.cs @@ -16,7 +16,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.E [DebuggerDisplay("{Id.Path}")] public sealed class File : FileSystemItem { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the creation date of the file system item. Can be optional if the information is not available. /// @@ -31,9 +30,7 @@ public sealed class File : FileSystemItem /// Gets or sets the size in bytes of the current file entity. /// public long Size { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -48,9 +45,7 @@ public sealed class File : FileSystemItem DateModified = dateModified; Size = size; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -153,5 +148,4 @@ public sealed class File : FileSystemItem Name = newName; return Result.Updated; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/UnixRootItem.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/UnixRootItem.cs index 7a2216c1..80760fa3 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/UnixRootItem.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/UnixRootItem.cs @@ -14,19 +14,14 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.E [DebuggerDisplay("{Id.Path}")] public sealed class UnixRootItem : FileSystemItem { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _items = []; private const string PATH = "/"; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of file system items that are children to the current file system root entity. /// public IReadOnlyCollection Items => _items.AsReadOnly(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +30,7 @@ public sealed class UnixRootItem : FileSystemItem private UnixRootItem(FileSystemPathId id, string name) : base(id, name, FileSystemItemType.Root) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -59,5 +52,4 @@ public sealed class UnixRootItem : FileSystemItem return setStatusResult.Errors; return newRoot; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/WindowsRootItem.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/WindowsRootItem.cs index f862ebca..ac825e1b 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/WindowsRootItem.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Entities/WindowsRootItem.cs @@ -14,18 +14,13 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.E [DebuggerDisplay("{Id.Path}")] public sealed class WindowsRootItem : FileSystemItem { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _items = []; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of file system items that are children to the current file system root entity. /// public IReadOnlyCollection Items => _items.AsReadOnly(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +29,7 @@ public sealed class WindowsRootItem : FileSystemItem private WindowsRootItem(FileSystemPathId id, string name) : base(id, name, FileSystemItemType.Root) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -87,5 +80,4 @@ public sealed class WindowsRootItem : FileSystemItem return setStatusResult.Errors; return newFile; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/FileSystemItem.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/FileSystemItem.cs index b5efaf41..3602546a 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/FileSystemItem.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/FileSystemItem.cs @@ -16,7 +16,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate; [DebuggerDisplay("{Name}")] public abstract class FileSystemItem : AggregateRoot { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the name of the file system item. /// @@ -36,9 +35,7 @@ public abstract class FileSystemItem : AggregateRoot /// Gets or sets the tpe of the file system item. /// public FileSystemItemType Type { get; protected set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -50,9 +47,7 @@ public abstract class FileSystemItem : AggregateRoot Name = name; Type = fileSystemItemType; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Sets the status of the filesystem item. /// @@ -77,5 +72,4 @@ public abstract class FileSystemItem : AggregateRoot return Errors.FileManagement.ParentNodeCannotBeNull; return Result.Updated; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryProviderService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryProviderService.cs index 5d02fcb5..ae6580b2 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryProviderService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryProviderService.cs @@ -18,12 +18,9 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// internal class DirectoryProviderService : IDirectoryProviderService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _fileSystem; private readonly IFileSystemPermissionsService _fileSystemPermissionsService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ internal class DirectoryProviderService : IDirectoryProviderService _fileSystem = fileSystem; _fileSystemPermissionsService = fileSystemPermissionsService; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves a list of subdirectory paths from the specified path. /// @@ -322,5 +317,4 @@ internal class DirectoryProviderService : IDirectoryProviderService _fileSystem.DirectoryInfo.New(path.Path).Delete(true); return Result.Deleted; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryService.cs index 8866b082..4069d457 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DirectoryService.cs @@ -18,12 +18,9 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class DirectoryService : IDirectoryService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPlatformContext _platformContext; private readonly IEnvironmentContext _environmentContext; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class DirectoryService : IDirectoryService _platformContext = platformContextManager.GetCurrentContext(); _environmentContext = environmentContext; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves subdirectories for the specified string path. /// @@ -336,5 +331,4 @@ public class DirectoryService : IDirectoryService { return _environmentContext.DirectoryProviderService.DeleteDirectory(path); } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DriveService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DriveService.cs index 76bc457b..07fcfa43 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DriveService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/DriveService.cs @@ -15,12 +15,9 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class DriveService : IDriveService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _fileSystem; private readonly IPlatformContext _platformContext; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class DriveService : IDriveService _fileSystem = fileSystem; _platformContext = platformContextManager.GetCurrentContext(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves the list of drives. /// @@ -64,5 +59,4 @@ public class DriveService : IDriveService .Select(errorOrDrive => errorOrDrive.Value) .AsEnumerable()); } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileProviderService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileProviderService.cs index 0e09a06c..82746207 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileProviderService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileProviderService.cs @@ -18,12 +18,9 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// internal class FileProviderService : IFileProviderService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _fileSystem; private readonly IFileSystemPermissionsService _fileSystemPermissionsService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ internal class FileProviderService : IFileProviderService _fileSystem = fileSystem; _fileSystemPermissionsService = fileSystemPermissionsService; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves a list of file paths at the specified path. /// @@ -284,5 +279,4 @@ internal class FileProviderService : IFileProviderService _fileSystem.File.Delete(path.Path); return Result.Deleted; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileService.cs index 33be3f02..444f5dd5 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileService.cs @@ -18,12 +18,9 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class FileService : IFileService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPlatformContext _platformContext; private readonly IEnvironmentContext _environmentContext; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class FileService : IFileService _platformContext = platformContextManager.GetCurrentContext(); _environmentContext = environmentContext; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves files for the specified string path. /// @@ -327,5 +322,4 @@ public class FileService : IFileService { return true; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileSystemPermissionsService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileSystemPermissionsService.cs index 96d64258..0a24ba0f 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileSystemPermissionsService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileSystemPermissionsService.cs @@ -18,11 +18,8 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// internal class FileSystemPermissionsService : IFileSystemPermissionsService // TODO: refactor towards abstractions that could allow testing { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPlatformContextManager _platformContextManager; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +28,7 @@ internal class FileSystemPermissionsService : IFileSystemPermissionsService // T { _platformContextManager = platformContextManager; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Checks if can be accessed. /// @@ -209,5 +204,4 @@ internal class FileSystemPermissionsService : IFileSystemPermissionsService // T } return allowAccess; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileTypeService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileTypeService.cs index a05f8b57..c942ddf9 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileTypeService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/FileTypeService.cs @@ -20,13 +20,10 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class FileTypeService : IFileTypeService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _fileSystem; private readonly IFileSystemPermissionsService _fileSystemPermissionsService; private const int BUFFER_SIZE = 18; // 18 bytes should be more than enough for common images header types - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -37,9 +34,7 @@ public class FileTypeService : IFileTypeService _fileSystem = fileSystem; _fileSystemPermissionsService = fileSystemPermissionsService; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Determines if is of type image or not, and returns its type. /// @@ -159,5 +154,4 @@ public class FileTypeService : IFileTypeService return ImageType.WEBP; // WEBP return ImageType.None; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryProviderService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryProviderService.cs index a59d5e7e..3e176716 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryProviderService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryProviderService.cs @@ -13,7 +13,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IDirectoryProviderService { - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves a list of subdirectory paths from the specified path. /// @@ -91,5 +90,4 @@ public interface IDirectoryProviderService /// The path of the directory to be deleted. /// An containing either the result of deleting a directory, or an error. ErrorOr DeleteDirectory(FileSystemPathId path); - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryService.cs index b8451191..b2c84dc6 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDirectoryService.cs @@ -12,7 +12,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IDirectoryService { - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves subdirectories for the specified string path. /// @@ -77,5 +76,4 @@ public interface IDirectoryService /// String representation of the directory path. /// An containing either the result of deleting a directory, or an error. ErrorOr DeleteDirectory(string path); - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDriveService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDriveService.cs index ce9d1ca1..240a5860 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDriveService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IDriveService.cs @@ -10,11 +10,9 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IDriveService { - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves the list of drives. /// /// An containing either a collection of drives or an error. ErrorOr> GetDrives(); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileProviderService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileProviderService.cs index 328b037b..6dce33bd 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileProviderService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileProviderService.cs @@ -13,7 +13,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IFileProviderService { - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves a list of files at the specified path. /// @@ -96,5 +95,4 @@ public interface IFileProviderService /// The path of the file to be deleted. /// An containing either the result of deleting a file, or an error. ErrorOr DeleteFile(FileSystemPathId path); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileService.cs index cc7dd765..3d72da06 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileService.cs @@ -12,7 +12,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IFileService { - #region ===================================================================== METHODS =================================================================================== /// /// Retrieves files for the specified string path. /// @@ -69,5 +68,4 @@ public interface IFileService /// String representation of the file path. /// An containing either the result of deleting a file, or an error. ErrorOr DeleteFile(string path); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileSystemPermissionsService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileSystemPermissionsService.cs index 4fa61533..1eb76f9c 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileSystemPermissionsService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileSystemPermissionsService.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IFileSystemPermissionsService { - #region ===================================================================== METHODS =================================================================================== /// /// Checks if can be accessed. /// @@ -19,5 +18,4 @@ public interface IFileSystemPermissionsService /// Indicates whether the path represents a file or directory. /// , if can be accessed, otherwise. bool CanAccessPath(FileSystemPathId path, FileAccessMode accessMode, bool isFile = true); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileTypeService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileTypeService.cs index 7d74c0bb..19285cff 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileTypeService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IFileTypeService.cs @@ -14,7 +14,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IFileTypeService { - #region ===================================================================== METHODS =================================================================================== /// /// Determines if is of type image or not, and returns its type. /// @@ -30,5 +29,4 @@ public interface IFileTypeService /// Cancellation token that can be used to stop the execution. /// An containing the type of image or an error. Task> GetImageTypeAsync(FileSystemPathId path, CancellationToken cancellationToken); - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IPathService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IPathService.cs index b34f442a..ddfaa94f 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IPathService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IPathService.cs @@ -11,14 +11,11 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IPathService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the character used to separate path segments. /// char PathSeparator { get; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Checks if is a valid path. /// @@ -68,5 +65,4 @@ public interface IPathService /// The path for which to get the root. /// An containing the root of , or an error. ErrorOr GetPathRoot(string path); - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IThumbnailService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IThumbnailService.cs index 55e60fd4..c48225d8 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IThumbnailService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/IThumbnailService.cs @@ -12,7 +12,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IThumbnailService { - #region ===================================================================== METHODS =================================================================================== /// /// Gets the thumbnail of a file at the specified path. /// @@ -30,5 +29,4 @@ public interface IThumbnailService /// Cancellation token that can be used to stop the execution. /// An containing either a collection of bytes representing the thumbnail of the file at the specified path or an error. Task> GetThumbnailAsync(FileSystemPathId path, int quality, CancellationToken cancellationToken); - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/PathService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/PathService.cs index a1bc87bc..5ba130dd 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/PathService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/PathService.cs @@ -13,18 +13,13 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class PathService : IPathService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPlatformContext _platformContext; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the character used to separate path segments. /// public char PathSeparator => _platformContext.PathStrategy.PathSeparator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,9 +28,7 @@ public class PathService : IPathService { _platformContext = platformContextManager.GetCurrentContext(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Checks if is a valid path. /// @@ -129,5 +122,4 @@ public class PathService : IPathService return newPathResult.Errors; return _platformContext.PathStrategy.GetPathRoot(newPathResult.Value); } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/ThumbnailService.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/ThumbnailService.cs index 23252b53..5e3bcee3 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/ThumbnailService.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Services/ThumbnailService.cs @@ -21,11 +21,8 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class ThumbnailService : IThumbnailService { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IEnvironmentContext _environmentContext; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class ThumbnailService : IThumbnailService { _environmentContext = environmentContext; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the thumbnail of a file at the specified path. /// @@ -191,5 +186,4 @@ public class ThumbnailService : IThumbnailService { return ((value - fromSource) * (toTarget - fromTarget) / (toSource - fromSource)) + fromTarget; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/EnvironmentContext.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/EnvironmentContext.cs index b79b8028..850fc5be 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/EnvironmentContext.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/EnvironmentContext.cs @@ -9,7 +9,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// internal class EnvironmentContext : IEnvironmentContext { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for identifying and handling different file types. /// @@ -24,9 +23,7 @@ internal class EnvironmentContext : IEnvironmentContext /// Gets the service for performing directory-related operations. /// public IDirectoryProviderService DirectoryProviderService { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -39,5 +36,4 @@ internal class EnvironmentContext : IEnvironmentContext FileProviderService = fileProviderService; DirectoryProviderService = directoryProviderService; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/IEnvironmentContext.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/IEnvironmentContext.cs index 42eb1168..4abd5b78 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/IEnvironmentContext.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Environment/IEnvironmentContext.cs @@ -9,7 +9,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IEnvironmentContext { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for identifying and handling different file types. /// @@ -24,5 +23,4 @@ public interface IEnvironmentContext /// Gets the service for providing file system directories. /// IDirectoryProviderService DirectoryProviderService { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/IPathStrategy.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/IPathStrategy.cs index ea4d79ac..fd41d7d9 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/IPathStrategy.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/IPathStrategy.cs @@ -11,11 +11,8 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IPathStrategy { - #region ==================================================================== PROPERTIES ================================================================================= public char PathSeparator { get; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Checks if is a valid path. /// @@ -65,5 +62,4 @@ public interface IPathStrategy /// The path for which to get the root. /// An containing the root of , or an error. ErrorOr GetPathRoot(FileSystemPathId path); - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/UnixPathStrategy.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/UnixPathStrategy.cs index 41fa6cc6..cc858a6c 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/UnixPathStrategy.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/UnixPathStrategy.cs @@ -17,15 +17,10 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class UnixPathStrategy : IUnixPathStrategy { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _fileSystem; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= public char PathSeparator => '/'; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +29,7 @@ public class UnixPathStrategy : IUnixPathStrategy { _fileSystem = fileSystem; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Checks if is a valid path. /// @@ -176,5 +169,4 @@ public class UnixPathStrategy : IUnixPathStrategy return PathSegment.Create(PathSeparator.ToString(), isDirectory: false, isDrive: true); return Errors.FileManagement.InvalidPath; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/WindowsPathStrategy.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/WindowsPathStrategy.cs index 9e1336fe..8ab9d278 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/WindowsPathStrategy.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Path/WindowsPathStrategy.cs @@ -17,15 +17,10 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class WindowsPathStrategy : IWindowsPathStrategy { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _fileSystem; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= public char PathSeparator => '\\'; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +29,7 @@ public class WindowsPathStrategy : IWindowsPathStrategy { _fileSystem = fileSystem; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Checks if is a valid path. /// @@ -232,5 +225,4 @@ public class WindowsPathStrategy : IWindowsPathStrategy // if we reach here, the path is neither a valid UNC path nor a valid drive path return Errors.FileManagement.InvalidPath; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IOperatingSystemInfo.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IOperatingSystemInfo.cs index 4a6875c4..4fe05f69 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IOperatingSystemInfo.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IOperatingSystemInfo.cs @@ -9,12 +9,10 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IOperatingSystemInfo { - #region ===================================================================== METHODS =================================================================================== /// /// Determines if the current Operating System plaform is . /// /// The Operating System platform to check against. /// if tthe current Operating System platform is equal to , otherwise. bool IsOSPlatform(OSPlatform platform); - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContext.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContext.cs index e309b93b..b285d2aa 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContext.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContext.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IPlatformContext { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the platform for the current platform context. /// @@ -20,5 +19,4 @@ public interface IPlatformContext /// Gets the path strategy for the current platform context. /// IPathStrategy PathStrategy { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextFactory.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextFactory.cs index 1738472e..8ce72412 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextFactory.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextFactory.cs @@ -5,12 +5,10 @@ /// public interface IPlatformContextFactory { - #region ===================================================================== METHODS =================================================================================== /// /// Creates and returns the appropriate platform context. /// /// The type of platform context to create. /// The created platform context. TIPlatformContext CreateStrategy() where TIPlatformContext : IPlatformContext; - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextManager.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextManager.cs index c3240a80..d29df76a 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextManager.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/IPlatformContextManager.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public interface IPlatformContextManager { - #region ===================================================================== METHODS =================================================================================== /// /// Gets the current platform context. /// @@ -23,5 +22,4 @@ public interface IPlatformContextManager /// The platform to be set. /// Thrown when an unsupported platform type is provided. void SetCurrentPlatform(PlatformType platformType); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/OperatingSystemInfo.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/OperatingSystemInfo.cs index f2404710..250af820 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/OperatingSystemInfo.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/OperatingSystemInfo.cs @@ -11,7 +11,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S [ExcludeFromCodeCoverage] internal class OperatingSystemInfo : IOperatingSystemInfo { - #region ===================================================================== METHODS =================================================================================== /// /// Determines if the current Operating System plaform is . /// @@ -21,5 +20,4 @@ internal class OperatingSystemInfo : IOperatingSystemInfo { return RuntimeInformation.IsOSPlatform(platform); } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextFactory.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextFactory.cs index 4579eeca..38620e2c 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextFactory.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextFactory.cs @@ -10,11 +10,8 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class PlatformContextFactory : IPlatformContextFactory { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IServiceProvider _serviceProvider; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -23,9 +20,7 @@ public class PlatformContextFactory : IPlatformContextFactory { _serviceProvider = serviceProvider; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates and returns the appropriate platform context. /// @@ -35,5 +30,4 @@ public class PlatformContextFactory : IPlatformContextFactory { return _serviceProvider.GetRequiredService() ?? throw new ArgumentException(); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextManager.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextManager.cs index 946351df..e029129f 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextManager.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/PlatformContextManager.cs @@ -11,13 +11,10 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class PlatformContextManager : IPlatformContextManager { - #region ================================================================== FIELD MEMBERS ================================================================================ private IPlatformContext? _currentPlatformContext; private readonly IPlatformContextFactory _platformContextFactory; private readonly IOperatingSystemInfo _operatingSystemInfo; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -28,9 +25,7 @@ public class PlatformContextManager : IPlatformContextManager _platformContextFactory = platformContextFactory; _operatingSystemInfo = operatingSystemInfo; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the current platform context. /// @@ -63,5 +58,4 @@ public class PlatformContextManager : IPlatformContextManager _ => throw new ArgumentException($"Unsupported platform type: {platformType}"), }; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/UnixPlatformContext.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/UnixPlatformContext.cs index fedf3d70..c7579366 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/UnixPlatformContext.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/UnixPlatformContext.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// internal class UnixPlatformContext : IUnixPlatformContext { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the platform type, which is Unix for this context. /// @@ -20,9 +19,7 @@ internal class UnixPlatformContext : IUnixPlatformContext /// Gets the path strategy for Unix platforms. /// public IPathStrategy PathStrategy { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,5 +28,4 @@ internal class UnixPlatformContext : IUnixPlatformContext { PathStrategy = unixPathStrategy; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/WindowsPlatformContext.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/WindowsPlatformContext.cs index 93f7f2a4..837cbea5 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/WindowsPlatformContext.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/Strategies/Platform/WindowsPlatformContext.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.S /// public class WindowsPlatformContext : IWindowsPlatformContext { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the platform type, which is Windows for this context. /// @@ -20,9 +19,7 @@ public class WindowsPlatformContext : IWindowsPlatformContext /// Gets the path strategy for Windows platforms. /// public IPathStrategy PathStrategy { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,5 +28,4 @@ public class WindowsPlatformContext : IWindowsPlatformContext { PathStrategy = windowsPathStrategy; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/FileSystemPathId.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/FileSystemPathId.cs index 4df03714..8921ce95 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/FileSystemPathId.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/FileSystemPathId.cs @@ -14,14 +14,11 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.V [DebuggerDisplay("{Path}")] public sealed class FileSystemPathId : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the value of this object. /// public string Path { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public sealed class FileSystemPathId : ValueObject { Path = path; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// public override IEnumerable GetEqualityComponents() { @@ -52,5 +47,4 @@ public sealed class FileSystemPathId : ValueObject return Errors.FileManagement.InvalidPath; return new FileSystemPathId(path); } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/PathSegment.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/PathSegment.cs index d14b5717..1a05af70 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/PathSegment.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/PathSegment.cs @@ -14,7 +14,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.V [DebuggerDisplay("{Name}")] public class PathSegment : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the path segment. /// @@ -29,9 +28,7 @@ public class PathSegment : ValueObject /// Gets the value indicating if the current path segment is a file system drive or not. /// public bool IsDrive { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -44,9 +41,7 @@ public class PathSegment : ValueObject IsDirectory = isDirectory; IsDrive = isDrive; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -70,5 +65,4 @@ public class PathSegment : ValueObject yield return IsDirectory; yield return IsDrive; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/StreamInfo.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/StreamInfo.cs index 681258ca..1d0ddd38 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/StreamInfo.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/StreamInfo.cs @@ -15,7 +15,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.V [DebuggerDisplay("{StreamId}")] public class StreamInfo : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the id of the stream. /// @@ -55,9 +54,7 @@ public class StreamInfo : ValueObject /// Gets the optional channels of the stream. /// public Optional Channels { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -88,9 +85,7 @@ public class StreamInfo : ValueObject SampleRate = sampleRate; Channels = channels; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -136,5 +131,4 @@ public class StreamInfo : ValueObject yield return SampleRate; yield return Channels; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/Thumbnail.cs b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/Thumbnail.cs index 836c2598..581362d3 100644 --- a/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/Thumbnail.cs +++ b/src/Lumina.Domain/Core/Aggregates/FileManagement/FileManagementAggregate/ValueObjects/Thumbnail.cs @@ -13,7 +13,6 @@ namespace Lumina.Domain.Core.Aggregates.FileManagement.FileManagementAggregate.V [DebuggerDisplay("{Type}")] public class Thumbnail : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the type of the image represented by this thumbnail. /// @@ -23,9 +22,7 @@ public class Thumbnail : ValueObject /// Gets the bytes of the image represented by this thumbnail. /// public byte[] Bytes { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -36,14 +33,11 @@ public class Thumbnail : ValueObject Type = type; Bytes = bytes; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// public override IEnumerable GetEqualityComponents() { yield return Type; yield return Bytes; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs index 48490e0a..e00776d9 100644 --- a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs +++ b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs @@ -16,7 +16,6 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega [DebuggerDisplay("{Id}: {Name}")] public class MediaContributor : AggregateRoot { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the contributor. /// @@ -41,9 +40,7 @@ public class MediaContributor : AggregateRoot /// Gets the date of death of the contributor. /// public Optional DateOfDeath { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -65,9 +62,7 @@ public class MediaContributor : AggregateRoot DateOfBirth = dateOfBirth; DateOfDeath = dateOfDeath; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -95,5 +90,4 @@ public class MediaContributor : AggregateRoot { return new MediaContributor(id, name, role, dateOfBirth, dateOfDeath); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/ContributorName.cs b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/ContributorName.cs index 1e0ae8e0..a57342b4 100644 --- a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/ContributorName.cs +++ b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/ContributorName.cs @@ -14,7 +14,6 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega [DebuggerDisplay("{DisplayName}")] public sealed class MediaContributorName : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name by which the contributor is popularly known. /// @@ -24,9 +23,7 @@ public sealed class MediaContributorName : ValueObject /// Gets the legal name of the contributor. /// public Optional LegalName { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -37,9 +34,7 @@ public sealed class MediaContributorName : ValueObject DisplayName = displayName; LegalName = legalName; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -58,5 +53,4 @@ public sealed class MediaContributorName : ValueObject yield return DisplayName; yield return LegalName; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs index ecf165f3..500e7316 100644 --- a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs +++ b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs @@ -11,7 +11,6 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega /// public sealed class MediaContributorId : EntityId { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -19,9 +18,7 @@ public sealed class MediaContributorId : EntityId private MediaContributorId(Guid value) : base(value) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -48,5 +45,4 @@ public sealed class MediaContributorId : EntityId { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorRole.cs b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorRole.cs index b8049abc..26c3a7d6 100644 --- a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorRole.cs +++ b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorRole.cs @@ -12,7 +12,6 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega [DebuggerDisplay("{DisplayName}")] public sealed class MediaContributorRole : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the value representing this object. /// @@ -22,9 +21,7 @@ public sealed class MediaContributorRole : ValueObject /// Gets the category of this object. /// public string Category { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +32,7 @@ public sealed class MediaContributorRole : ValueObject Name = name; Category = category; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class, from a pre-existing . /// @@ -56,5 +51,4 @@ public sealed class MediaContributorRole : ValueObject yield return Name; yield return Category; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Movie.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Movie.cs index 4cc0ca3c..e620a98a 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Movie.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Movie.cs @@ -16,12 +16,9 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.MovieLibraryAggregate; [DebuggerDisplay("{Id}: {Title}")] public sealed class Movie : Entity { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _contributors; private readonly List _ratings; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the video metadata of the movie. /// @@ -36,9 +33,7 @@ public sealed class Movie : Entity /// Gets the list of media contributors (actors, directors, etc) starring in this movie. /// public IReadOnlyCollection Contributors => _contributors.AsReadOnly(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -63,9 +58,7 @@ public sealed class Movie : Entity } #pragma warning restore CS8618 - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -92,5 +85,4 @@ public sealed class Movie : Entity // TODO: enforce invariants return new Movie(id, metadata, contributors, ratings); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/IMovieLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/IMovieLibraryService.cs index 34d20101..bfa5eb92 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/IMovieLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/IMovieLibraryService.cs @@ -9,10 +9,8 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.MovieLibraryAggregate.Servi /// public interface IMovieLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of movies in the library. /// public ICollection Movies { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/MovieLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/MovieLibraryService.cs index 4032ed89..ebef3153 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/MovieLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/Services/MovieLibraryService.cs @@ -10,10 +10,8 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.MovieLibraryAggregate.Servi /// public sealed class MovieLibraryService : IMovieLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of movies in the library. /// public ICollection Movies => throw new NotImplementedException(); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/MovieId.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/MovieId.cs index 52eb20d6..05a04a60 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/MovieId.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/MovieId.cs @@ -13,7 +13,6 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.MovieLibraryAggregate.Value [DebuggerDisplay("{Value}")] public sealed class MovieId : EntityId { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -21,9 +20,7 @@ public sealed class MovieId : EntityId private MovieId(Guid value) : base(value) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -50,5 +47,4 @@ public sealed class MovieId : EntityId { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/VideoMetadata.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/VideoMetadata.cs index 1970510e..478a3d73 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/VideoMetadata.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/MovieLibraryAggregate/ValueObjects/VideoMetadata.cs @@ -15,7 +15,6 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.MovieLibraryAggregate.Value [DebuggerDisplay("{Title}")] public class VideoMetadata : BaseMetadata { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the duration of the video in seconds. /// @@ -40,9 +39,7 @@ public class VideoMetadata : BaseMetadata /// Gets the audio codec used. /// public Optional AudioCodec { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -81,9 +78,7 @@ public class VideoMetadata : BaseMetadata VideoCodec = videoCodec; AudioCodec = audioCodec; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -133,5 +128,4 @@ public class VideoMetadata : BaseMetadata yield return VideoCodec; yield return AudioCodec; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/IVideoLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/IVideoLibraryService.cs index cea13727..ea56bf38 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/IVideoLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/IVideoLibraryService.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.Services; /// public interface IVideoLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for managing a movie library. /// @@ -20,5 +19,4 @@ public interface IVideoLibraryService /// Gets the service for managing a TV shows library. /// public ITvShowLibraryService TvShowLibraryService { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/VideoLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/VideoLibraryService.cs index d1170de8..da52db32 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/VideoLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/Services/VideoLibraryService.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.Services; /// public class VideoLibraryService : IVideoLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for managing a movie library. /// @@ -20,9 +19,7 @@ public class VideoLibraryService : IVideoLibraryService /// Gets the service for managing a TV shows library. /// public ITvShowLibraryService TvShowLibraryService { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,8 +30,4 @@ public class VideoLibraryService : IVideoLibraryService MovieLibraryService = movieLibraryService; TvShowLibraryService = tvShowLibraryService; } - #endregion - - #region ===================================================================== METHODS =================================================================================== - #endregion -} \ No newline at end of file +} diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/ITvShowLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/ITvShowLibraryService.cs index 15f0fbb1..386134c3 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/ITvShowLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/ITvShowLibraryService.cs @@ -9,10 +9,8 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.TvShowLibraryAggregate.Serv /// public interface ITvShowLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of TV shows in the library. /// public ICollection TvShows { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/TvShowLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/TvShowLibraryService.cs index c6108585..a3dd7d4f 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/TvShowLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/Services/TvShowLibraryService.cs @@ -10,10 +10,8 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.TvShowLibraryAggregate.Serv /// public class TvShowLibraryService : ITvShowLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of TV shows in the library. /// public ICollection TvShows => throw new NotImplementedException(); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/EpisodeId.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/EpisodeId.cs index f033a790..f390a3c6 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/EpisodeId.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/EpisodeId.cs @@ -11,7 +11,6 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.TvShowLibraryAggregate.Valu /// public sealed class EpisodeId : EntityId { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -19,9 +18,7 @@ public sealed class EpisodeId : EntityId private EpisodeId(Guid value) : base(value) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -48,5 +45,4 @@ public sealed class EpisodeId : EntityId { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/SeasonId.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/SeasonId.cs index 65292632..b2a732ec 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/SeasonId.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/SeasonId.cs @@ -11,7 +11,6 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.TvShowLibraryAggregate.Valu /// public sealed class SeasonId : EntityId { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -19,9 +18,7 @@ public sealed class SeasonId : EntityId private SeasonId(Guid value) : base(value) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -48,5 +45,4 @@ public sealed class SeasonId : EntityId { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/TvShowId.cs b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/TvShowId.cs index 50ade7c2..c37f5ef2 100644 --- a/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/TvShowId.cs +++ b/src/Lumina.Domain/Core/Aggregates/VideoLibrary/TvShowLibraryAggregate/ValueObjects/TvShowId.cs @@ -11,7 +11,6 @@ namespace Lumina.Domain.Core.Aggregates.VideoLibrary.TvShowLibraryAggregate.Valu /// public sealed class TvShowId : EntityId { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -19,9 +18,7 @@ public sealed class TvShowId : EntityId private TvShowId(Guid value) : base(value) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -48,5 +45,4 @@ public sealed class TvShowId : EntityId { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs index a4023107..faa4dbcd 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs @@ -19,13 +19,10 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Id}: {Title}")] public sealed class Book : AggregateRoot { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _contributors; private readonly List _ratings; private readonly List _isbns; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the written content metadata of the book. /// @@ -110,9 +107,7 @@ public sealed class Book : AggregateRoot /// Gets the list of ratings for this book. /// public IReadOnlyCollection Ratings => _ratings.AsReadOnly(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -189,9 +184,7 @@ public sealed class Book : AggregateRoot } #pragma warning restore CS8618 - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -329,5 +322,4 @@ public sealed class Book : AggregateRoot contributors, ratings); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Entities/BookSeries.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Entities/BookSeries.cs index 75e22dcc..ef21a589 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Entities/BookSeries.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Entities/BookSeries.cs @@ -15,11 +15,8 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Id}: {Title}")] public sealed class BookSeries : Entity { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _books; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the written content metadata of the book series. /// @@ -34,9 +31,7 @@ public sealed class BookSeries : Entity /// Gets the collection of books in the series. /// public IReadOnlyCollection Books => _books.AsReadOnly(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -52,9 +47,7 @@ public sealed class BookSeries : Entity IsComplete = isComplete; _books = books; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -127,5 +120,4 @@ public sealed class BookSeries : Entity _books.Remove(book); return Result.Deleted; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/BookLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/BookLibraryService.cs index 8f30c656..27be5efe 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/BookLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/BookLibraryService.cs @@ -10,10 +10,8 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega /// public sealed class BookLibraryService : IBookLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of books in the library. /// public ICollection Books => throw new NotImplementedException(); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/IBookLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/IBookLibraryService.cs index f27b296b..ee05ac0e 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/IBookLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Services/IBookLibraryService.cs @@ -9,14 +9,12 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega /// public interface IBookLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the collection of books in the library. /// ICollection Books { get; } // ICollection Series { get; } - #endregion // void AddBook(Book book); // void RemoveBook(Guid bookId); diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs index 10c239ed..49585405 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs @@ -13,7 +13,6 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Value}")] public sealed class BookId : EntityId { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -21,9 +20,7 @@ public sealed class BookId : EntityId private BookId(Guid value) : base(value) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -48,5 +45,4 @@ public sealed class BookId : EntityId { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookLibraryId.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookLibraryId.cs index d5d31d0c..f6940acc 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookLibraryId.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookLibraryId.cs @@ -14,7 +14,6 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Value}")] public sealed class BookLibraryId : EntityId { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -22,9 +21,7 @@ public sealed class BookLibraryId : EntityId private BookLibraryId(Guid value) : base(value) { } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -51,5 +48,4 @@ public sealed class BookLibraryId : EntityId { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookRating.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookRating.cs index fa45b84d..6fd5ed35 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookRating.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookRating.cs @@ -16,14 +16,11 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Value}/{MaxValue}")] public class BookRating : Rating { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the optional source of the rating (e.g., "Goodreads", "Amazon"). /// public Optional Source { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -36,9 +33,7 @@ public class BookRating : Rating { Source = source; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -80,5 +75,4 @@ public class BookRating : Rating baseString += $" [{VoteCount.Value} votes]"; return baseString; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookSeriesId.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookSeriesId.cs index f78024f4..ea40e631 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookSeriesId.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookSeriesId.cs @@ -13,11 +13,8 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Value}")] public sealed class BookSeriesId : ValueObject { - #region ==================================================================== PROPERTIES ================================================================================= public Guid Value { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public sealed class BookSeriesId : ValueObject { Value = value; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -53,5 +48,4 @@ public sealed class BookSeriesId : ValueObject { yield return Value; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/Isbn.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/Isbn.cs index d0b2c07c..aa6dfa1b 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/Isbn.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/Isbn.cs @@ -16,12 +16,9 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Value} ({Format})")] public sealed class Isbn : ValueObject { - #region ================================================================== FIELD MEMBERS ================================================================================ private static readonly Regex s_isbn10Regex = new(@"^(?:ISBN(?:-10)?:? )?(?=[0-9X]{10}$|(?=(?:[0-9]+[-\ ]){3})[-\ 0-9X]{13}$)[0-9]{1,5}[-\ ]?[0-9]+[-\ ]?[0-9]+[-\ ]?[0-9X]$", RegexOptions.Compiled); private static readonly Regex s_isbn13Regex = new(@"^(?:ISBN(?:-13)?:? )?(?=[0-9]{13}$|(?=(?:[0-9]+[-\ ]){4})[-\ 0-9]{17}$)97[89][-\ ]?[0-9]{1,5}[-\ ]?[0-9]+[-\ ]?[0-9]+[-\ ]?[0-9]$", RegexOptions.Compiled); - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the value of the ISBN. /// @@ -31,9 +28,7 @@ public sealed class Isbn : ValueObject /// Gets the format of the ISBN. /// public IsbnFormat Format { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -44,9 +39,7 @@ public sealed class Isbn : ValueObject Value = value; Format = format; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -122,5 +115,4 @@ public sealed class Isbn : ValueObject yield return Value; yield return Format; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/WrittenContentMetadata.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/WrittenContentMetadata.cs index 2adec962..19383cd1 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/WrittenContentMetadata.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/WrittenContentMetadata.cs @@ -15,7 +15,6 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega [DebuggerDisplay("{Title}")] public class WrittenContentMetadata : BaseMetadata { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the publisher of the written content. /// @@ -25,9 +24,7 @@ public class WrittenContentMetadata : BaseMetadata /// Gets the number of pages in the written content. /// public Optional PageCount { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -57,9 +54,7 @@ public class WrittenContentMetadata : BaseMetadata Publisher = publisher; PageCount = pageCount; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a new instance of the class. /// @@ -117,5 +112,4 @@ public class WrittenContentMetadata : BaseMetadata yield return Publisher; yield return PageCount; } - #endregion } diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/IWrittenContentLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/IWrittenContentLibraryService.cs index 7b9eb60a..64cb6df6 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/IWrittenContentLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/IWrittenContentLibraryService.cs @@ -9,10 +9,8 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.Services; /// public interface IWrittenContentLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for managing book libraries. /// public IBookLibraryService BookLibraryService { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/WrittenContentLibraryService.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/WrittenContentLibraryService.cs index 64d40632..44ae2570 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/WrittenContentLibraryService.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/Services/WrittenContentLibraryService.cs @@ -9,14 +9,11 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.Services; /// public class WrittenContentLibraryService : IWrittenContentLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for managing book libraries. /// public IBookLibraryService BookLibraryService { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -25,8 +22,4 @@ public class WrittenContentLibraryService : IWrittenContentLibraryService { BookLibraryService = bookLibraryService; } - #endregion - - #region ===================================================================== METHODS =================================================================================== - #endregion -} \ No newline at end of file +} diff --git a/src/Lumina.Domain/Core/Services/IMediaLibraryService.cs b/src/Lumina.Domain/Core/Services/IMediaLibraryService.cs index dd2b39ea..ca64be06 100644 --- a/src/Lumina.Domain/Core/Services/IMediaLibraryService.cs +++ b/src/Lumina.Domain/Core/Services/IMediaLibraryService.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Services; /// public interface IMediaLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for managing a audio library. /// @@ -25,5 +24,4 @@ public interface IMediaLibraryService /// Gets the service for managing a written content library. /// public IWrittenContentLibraryService WrittenContentLibraryService { get; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Core/Services/MediaLibraryService.cs b/src/Lumina.Domain/Core/Services/MediaLibraryService.cs index 12616d12..7004acbe 100644 --- a/src/Lumina.Domain/Core/Services/MediaLibraryService.cs +++ b/src/Lumina.Domain/Core/Services/MediaLibraryService.cs @@ -10,7 +10,6 @@ namespace Lumina.Domain.Core.Services; /// public class MediaLibraryService : IMediaLibraryService { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the service for managing a video library. /// @@ -20,9 +19,7 @@ public class MediaLibraryService : IMediaLibraryService /// Gets the service for managing a written content library. /// public IWrittenContentLibraryService WrittenContentLibraryService { get; private set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,5 +30,4 @@ public class MediaLibraryService : IMediaLibraryService VideoLibraryService = videoLibraryService; WrittenContentLibraryService = writtenContentLibraryService; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs b/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs index b087af26..1e1d0ce0 100644 --- a/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs +++ b/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs @@ -11,7 +11,6 @@ namespace Lumina.Infrastructure.Common.DependencyInjection; /// public static class InfrastructureLayerServices { - #region ===================================================================== METHODS =================================================================================== /// /// Extension method for adding the Infrastructure layer services to the DI container. /// @@ -24,5 +23,4 @@ public static class InfrastructureLayerServices return services; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Infrastructure/Common/DependencyInjection/SharedConfiguration.cs b/src/Lumina.Infrastructure/Common/DependencyInjection/SharedConfiguration.cs index ff0fe09d..3229546d 100644 --- a/src/Lumina.Infrastructure/Common/DependencyInjection/SharedConfiguration.cs +++ b/src/Lumina.Infrastructure/Common/DependencyInjection/SharedConfiguration.cs @@ -14,7 +14,6 @@ namespace Lumina.Infrastructure.Common.DependencyInjection; /// public static class SharedConfiguration { - #region ================================================================== METHODS =================================================================================== /// /// Extension method for registering the shared configuration to the DI container. /// @@ -45,5 +44,4 @@ public static class SharedConfiguration .ValidateOnStart(); return services; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs b/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs index 948a2ee3..ff34f4b3 100644 --- a/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs +++ b/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs @@ -11,9 +11,7 @@ public static partial class Errors { public static class Configuration { - #region ==================================================================== PROPERTIES ================================================================================= public static Error ApplicationThemeCannotBeEmpty => Error.Validation(nameof(ApplicationThemeCannotBeEmpty)); public static Error DatabaseConnectionStringCannotBeEmpty => Error.Validation(nameof(DatabaseConnectionStringCannotBeEmpty)); - #endregion } -} \ No newline at end of file +} diff --git a/src/Lumina.Infrastructure/Common/Models/Configuration/CommonSettingsModel.cs b/src/Lumina.Infrastructure/Common/Models/Configuration/CommonSettingsModel.cs index deb90bcd..1a31522f 100644 --- a/src/Lumina.Infrastructure/Common/Models/Configuration/CommonSettingsModel.cs +++ b/src/Lumina.Infrastructure/Common/Models/Configuration/CommonSettingsModel.cs @@ -10,14 +10,10 @@ namespace Lumina.Infrastructure.Common.Models.Configuration; [DebuggerDisplay("{SECTION_NAME}")] public class CommonSettingsModel { - #region ================================================================== FIELD MEMBERS ================================================================================ public const string SECTION_NAME = "CommonSettings"; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the theme of the application. /// public required string Theme { get; init; } - #endregion } diff --git a/src/Lumina.Infrastructure/Common/Models/Configuration/DatabaseSettingsModel.cs b/src/Lumina.Infrastructure/Common/Models/Configuration/DatabaseSettingsModel.cs index 7b68b6a5..b61a2809 100644 --- a/src/Lumina.Infrastructure/Common/Models/Configuration/DatabaseSettingsModel.cs +++ b/src/Lumina.Infrastructure/Common/Models/Configuration/DatabaseSettingsModel.cs @@ -10,14 +10,10 @@ namespace Lumina.Infrastructure.Common.Models.Configuration; [DebuggerDisplay("{SECTION_NAME}")] public class DatabaseSettingsModel { - #region ================================================================== FIELD MEMBERS ================================================================================ public const string SECTION_NAME = "ConnectionStrings"; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the connection string to the database. /// public required string DefaultConnection { get; init; } - #endregion } diff --git a/src/Lumina.Infrastructure/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs b/src/Lumina.Infrastructure/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs index 5c7a8570..80cd3011 100644 --- a/src/Lumina.Infrastructure/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs +++ b/src/Lumina.Infrastructure/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs @@ -12,7 +12,6 @@ namespace Lumina.Infrastructure.Common.Utilities; /// public static class OptionsBuilderFluentValidationUtilities { - #region ================================================================== METHODS =================================================================================== /// /// Extension method to add fluent validation to the options validation pipeline. /// @@ -29,5 +28,4 @@ public static class OptionsBuilderFluentValidationUtilities serviceProvider => new FluentValidationOptions(optionsBuilder.Name, serviceProvider.GetRequiredService>())); return optionsBuilder; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Infrastructure/Common/Validation/FluentValidationOptions.cs b/src/Lumina.Infrastructure/Common/Validation/FluentValidationOptions.cs index a5c2f18e..510e1826 100644 --- a/src/Lumina.Infrastructure/Common/Validation/FluentValidationOptions.cs +++ b/src/Lumina.Infrastructure/Common/Validation/FluentValidationOptions.cs @@ -13,18 +13,13 @@ namespace Lumina.Infrastructure.Common.Validation; /// The type of options being validated. public class FluentValidationOptions : IValidateOptions where TOptions : class { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IValidator _validator; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the options being validated. /// public string? Name { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +30,7 @@ public class FluentValidationOptions : IValidateOptions wher Name = name; _validator = validator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Validates the specified . /// @@ -61,10 +54,9 @@ public class FluentValidationOptions : IValidateOptions wher // if the validation fails, collect the error messages // TODO: add translation support for the error messages string[] errors = validationResult.Errors.Select(x => $"Options validation failed for '{x.PropertyName}' with error: '{x.ErrorMessage}'") - .ToArray(); + .ToArray(); // and return them with a failure result return ValidateOptionsResult.Fail(errors); } - #endregion -} \ No newline at end of file +} diff --git a/src/Lumina.Infrastructure/Common/Validators/CommonSettingsModelValidator.cs b/src/Lumina.Infrastructure/Common/Validators/CommonSettingsModelValidator.cs index 0dbf7a74..c2fb7edc 100644 --- a/src/Lumina.Infrastructure/Common/Validators/CommonSettingsModelValidator.cs +++ b/src/Lumina.Infrastructure/Common/Validators/CommonSettingsModelValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Infrastructure.Common.Validators; /// public class CommonSettingsModelValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class CommonSettingsModelValidator : AbstractValidator x.Theme).NotEmpty().WithMessage(Errors.Errors.Configuration.ApplicationThemeCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Infrastructure/Common/Validators/DatabaseSettingsModelValidator.cs b/src/Lumina.Infrastructure/Common/Validators/DatabaseSettingsModelValidator.cs index 74be0d32..e9140082 100644 --- a/src/Lumina.Infrastructure/Common/Validators/DatabaseSettingsModelValidator.cs +++ b/src/Lumina.Infrastructure/Common/Validators/DatabaseSettingsModelValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Infrastructure.Common.Validators; /// public class DatabaseSettingsModelValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -18,5 +17,4 @@ public class DatabaseSettingsModelValidator : AbstractValidator x.DefaultConnection).NotEmpty().WithMessage(Errors.Errors.Configuration.DatabaseConnectionStringCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Api/Common/Configuration/ConfigureSwaggerOptions.cs b/src/Lumina.Presentation.Api/Common/Configuration/ConfigureSwaggerOptions.cs index 8d29a56f..e15a35f1 100644 --- a/src/Lumina.Presentation.Api/Common/Configuration/ConfigureSwaggerOptions.cs +++ b/src/Lumina.Presentation.Api/Common/Configuration/ConfigureSwaggerOptions.cs @@ -13,11 +13,8 @@ namespace Lumina.Presentation.Api.Common.Configuration; /// public class ConfigureSwaggerOptions : IConfigureNamedOptions { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IApiVersionDescriptionProvider _provider; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class ConfigureSwaggerOptions : IConfigureNamedOptions { _provider = provider; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Configures the Swagger options. /// @@ -66,5 +61,4 @@ public class ConfigureSwaggerOptions : IConfigureNamedOptions info.Description += " This API version has been deprecated."; return info; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerConfiguration.cs b/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerConfiguration.cs index 5c04e7d6..2ffb81cc 100644 --- a/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerConfiguration.cs +++ b/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerConfiguration.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.Common.DependencyInjection; /// internal static class PresentationApiLayerConfiguration { - #region ================================================================== METHODS =================================================================================== /// /// Extension method for adding the Presentation API layer configuration to the DI container. /// @@ -31,5 +30,4 @@ internal static class PresentationApiLayerConfiguration return services; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs b/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs index dc8e0701..a358bfb6 100644 --- a/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs +++ b/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs @@ -17,7 +17,6 @@ namespace Lumina.Presentation.Api.Common.DependencyInjection; /// public static class PresentationApiLayerServices { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the services of the Presentation API layer into the dependency injection container. /// @@ -71,5 +70,4 @@ public static class PresentationApiLayerServices return services; } - #endregion } diff --git a/src/Lumina.Presentation.Api/Common/Errors/CustomProblemDetailsFactory.cs b/src/Lumina.Presentation.Api/Common/Errors/CustomProblemDetailsFactory.cs index 43274c4e..3ce6dcb2 100644 --- a/src/Lumina.Presentation.Api/Common/Errors/CustomProblemDetailsFactory.cs +++ b/src/Lumina.Presentation.Api/Common/Errors/CustomProblemDetailsFactory.cs @@ -19,12 +19,9 @@ namespace Lumina.Presentation.Api.Common.Errors; /// public class CustomProblemDetailsFactory : ProblemDetailsFactory { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ApiBehaviorOptions _options; private readonly Action? _configure; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -36,9 +33,7 @@ public class CustomProblemDetailsFactory : ProblemDetailsFactory _options = apiBehaviorOptions?.Value ?? throw new ArgumentNullException(nameof(apiBehaviorOptions)); _configure = problemDetailsOptions?.Value?.CustomizeProblemDetails; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a instance that configures defaults based on values specified in . /// @@ -120,5 +115,4 @@ public class CustomProblemDetailsFactory : ProblemDetailsFactory //problemDetails.Extensions.Add("errorCodes", errors.Select(e => e.Type.ToString())); _configure?.Invoke(new() { HttpContext = httpContext!, ProblemDetails = problemDetails }); } - #endregion } diff --git a/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs b/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs index a78ab0bf..1ce72009 100644 --- a/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs +++ b/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs @@ -7,7 +7,5 @@ namespace Lumina.Presentation.Api.Common.Http; /// public static class HttpContextItemKeys { - #region ================================================================== FIELD MEMBERS ================================================================================ public const string ERRORS = "errors"; - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Api/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs b/src/Lumina.Presentation.Api/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs index acd8c6b6..e7cd9b7b 100644 --- a/src/Lumina.Presentation.Api/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs +++ b/src/Lumina.Presentation.Api/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Api.Common.Mapping.WrittenContentLibrary.BookLibra /// public class BookMappingConfig : IRegister { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the mapping configuration. /// @@ -25,5 +24,4 @@ public class BookMappingConfig : IRegister .Map(dest => dest.OCLCNumber, src => src.OCLCNumber) .MapToConstructor(true); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Api/Common/ModelBinders/UrlStringBinder.cs b/src/Lumina.Presentation.Api/Common/ModelBinders/UrlStringBinder.cs index 93fe483c..37120985 100644 --- a/src/Lumina.Presentation.Api/Common/ModelBinders/UrlStringBinder.cs +++ b/src/Lumina.Presentation.Api/Common/ModelBinders/UrlStringBinder.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Api.Common.ModelBinders; /// public class UrlStringBinder : IModelBinder { - #region ===================================================================== METHODS =================================================================================== /// /// Binds a model to a value by using the specified controller context and binding context. /// @@ -36,5 +35,4 @@ public class UrlStringBinder : IModelBinder bindingContext.Result = ModelBindingResult.Success(value); return Task.CompletedTask; } - #endregion } diff --git a/src/Lumina.Presentation.Api/Common/Utilities/MimeTypes.cs b/src/Lumina.Presentation.Api/Common/Utilities/MimeTypes.cs index 3f0f81a4..17299f81 100644 --- a/src/Lumina.Presentation.Api/Common/Utilities/MimeTypes.cs +++ b/src/Lumina.Presentation.Api/Common/Utilities/MimeTypes.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Api.Common.Utilities; /// public static class MimeTypes { - #region ================================================================== FIELD MEMBERS ================================================================================ private static readonly FrozenDictionary s_imageTypeToMimeType = new Dictionary { { ImageType.BMP, "image/bmp" }, @@ -30,9 +29,7 @@ public static class MimeTypes { ImageType.TGA, "image/x-tga" }, { ImageType.SVG, "image/svg+xml" } }.ToFrozenDictionary(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the mime type of . /// @@ -42,5 +39,4 @@ public static class MimeTypes { return s_imageTypeToMimeType.TryGetValue(type, out string? mimeType) ? mimeType : "application/octet-stream"; } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/Common/ApiController.cs b/src/Lumina.Presentation.Api/Core/Controllers/Common/ApiController.cs index 17615fa5..dd16019a 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/Common/ApiController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/Common/ApiController.cs @@ -17,7 +17,6 @@ namespace Lumina.Presentation.Api.Core.Controllers.Common; [ApiVersion("1.0")] public abstract class ApiController : ControllerBase { - #region ===================================================================== METHODS =================================================================================== /// /// Handles controllers errors. /// @@ -67,5 +66,4 @@ public abstract class ApiController : ControllerBase modelStateDictionary.AddModelError(error.Code, error.Description); return ValidationProblem(modelStateDictionary: modelStateDictionary, title: "One or more validation errors occurred."); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DirectoriesController.cs b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DirectoriesController.cs index a615096a..134e5428 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DirectoriesController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DirectoriesController.cs @@ -22,11 +22,8 @@ namespace Lumina.Presentation.Api.Core.Controllers.FileManagement; [Route("api/v{version:apiVersion}/[controller]")] public class DirectoriesController : ApiController { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mediator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +32,7 @@ public class DirectoriesController : ApiController { _mediator = mediator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the tree of expanded directories leading up to , with the additional list of drives, and children of the last child directory. /// @@ -103,5 +98,4 @@ public class DirectoriesController : ApiController } } } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DrivesController.cs b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DrivesController.cs index e6fb4c7a..17393b70 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DrivesController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/DrivesController.cs @@ -19,11 +19,8 @@ namespace Lumina.Presentation.Api.Core.Controllers.FileManagement; [Route("api/v{version:apiVersion}/[controller]")] public class DrivesController : ApiController { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mediator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ public class DrivesController : ApiController { _mediator = mediator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Controller action for getting the list of all file system drives. /// @@ -45,5 +40,4 @@ public class DrivesController : ApiController ErrorOr> result = await _mediator.Send(new GetDrivesQuery(), cancellationToken).ConfigureAwait(false); return result.Match(result => Ok(result), errors => Problem(errors)); } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FileSystemController.cs b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FileSystemController.cs index b7050380..200f0774 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FileSystemController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FileSystemController.cs @@ -17,11 +17,8 @@ namespace Lumina.Presentation.Api.Core.Controllers.FileManagement; [Route("api/v{version:apiVersion}/file-system")] public class FileSystemController : ApiController { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mediator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class FileSystemController : ApiController { _mediator = mediator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the type of the file system. /// @@ -43,5 +38,4 @@ public class FileSystemController : ApiController FileSystemTypeResponse platformType = await _mediator.Send(new GetFileSystemQuery(), cancellationToken).ConfigureAwait(false); return Ok(platformType); } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FilesController.cs b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FilesController.cs index bfac0867..5a7d7c04 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FilesController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/FilesController.cs @@ -21,11 +21,8 @@ namespace Lumina.Presentation.Api.Core.Controllers.FileManagement; [Route("api/v{version:apiVersion}/[controller]")] public class FilesController : ApiController { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mediator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class FilesController : ApiController { _mediator = mediator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the files of . /// @@ -80,5 +75,4 @@ public class FilesController : ApiController } } } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/PathController.cs b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/PathController.cs index 888e8ddc..0292e3fa 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/PathController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/PathController.cs @@ -26,11 +26,8 @@ namespace Lumina.Presentation.Api.Core.Controllers.FileManagement; [Route("api/v{version:apiVersion}/[controller]")] public class PathController : ApiController { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mediator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -39,9 +36,7 @@ public class PathController : ApiController { _mediator = mediator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the root of . /// @@ -126,5 +121,4 @@ public class PathController : ApiController PathExistsResponse result = await _mediator.Send(new CheckPathExistsQuery(path, includeHiddenElements), cancellationToken).ConfigureAwait(false); return Ok(result); } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/ThumbnailsController.cs b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/ThumbnailsController.cs index 35231a60..72f3ede9 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/ThumbnailsController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/FileManagement/ThumbnailsController.cs @@ -20,11 +20,8 @@ namespace Lumina.Presentation.Api.Core.Controllers.FileManagement; [Route("api/v{version:apiVersion}/[controller]")] public class ThumbnailsController : ApiController { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mediator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,9 +30,7 @@ public class ThumbnailsController : ApiController { _mediator = mediator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the thumbnail of a file identified by of . /// @@ -48,5 +43,4 @@ public class ThumbnailsController : ApiController ErrorOr getResult = await _mediator.Send(new GetThumbnailQuery(path, quality), cancellationToken); return getResult.Match(result => File(result.Bytes, MimeTypes.GetMimeType(result.Type)), errors => Problem(errors)); } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/Maintenance/HealthController.cs b/src/Lumina.Presentation.Api/Core/Controllers/Maintenance/HealthController.cs index 51b65871..d66c202e 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/Maintenance/HealthController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/Maintenance/HealthController.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.Core.Controllers.Maintenance; [Route("[controller]")] public class HealthController : ApiController { - #region ===================================================================== METHODS =================================================================================== /// /// Checks if the application is healthy. /// @@ -22,5 +21,4 @@ public class HealthController : ApiController // TODO: to be implemented return await Task.FromResult(Ok()); } - #endregion } diff --git a/src/Lumina.Presentation.Api/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksController.cs b/src/Lumina.Presentation.Api/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksController.cs index 76f64894..7f20ffb1 100644 --- a/src/Lumina.Presentation.Api/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksController.cs +++ b/src/Lumina.Presentation.Api/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksController.cs @@ -18,12 +18,9 @@ namespace Lumina.Presentation.Api.Core.Controllers.WrittenContentLibrary.BookLib [Route("api/v{version:apiVersion}/[controller]")] public class BooksController : ApiController { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mediator; private readonly IMapper _mapper; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class BooksController : ApiController _mediator = mediator; _mapper = mapper; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Controller action for getting the list of all books. /// @@ -57,5 +52,4 @@ public class BooksController : ApiController ErrorOr.ErrorOr result = await _mediator.Send(_mapper.Map(request)).ConfigureAwait(false); return result.Match(result => Created($"/api/v1/books/{result.Id}", result), Problem); } - #endregion } diff --git a/src/Lumina.Presentation.Api/Program.cs b/src/Lumina.Presentation.Api/Program.cs index 78281cec..e70d334d 100644 --- a/src/Lumina.Presentation.Api/Program.cs +++ b/src/Lumina.Presentation.Api/Program.cs @@ -16,7 +16,6 @@ namespace Lumina.Presentation.Api; /// public class Program { - #region ===================================================================== METHODS =================================================================================== /// /// Application entry point. /// @@ -53,5 +52,4 @@ public class Program await app.RunAsync().ConfigureAwait(false); } - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/Api/ApiHttpClient.cs b/src/Lumina.Presentation.Web/Common/Api/ApiHttpClient.cs index f3be45b5..2db649d7 100644 --- a/src/Lumina.Presentation.Web/Common/Api/ApiHttpClient.cs +++ b/src/Lumina.Presentation.Web/Common/Api/ApiHttpClient.cs @@ -24,12 +24,9 @@ namespace Lumina.Presentation.Web.Common.Api; /// public class ApiHttpClient : IApiHttpClient { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly HttpClient _httpClient; private readonly JsonSerializerOptions _jsonOptions; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -49,9 +46,7 @@ public class ApiHttpClient : IApiHttpClient Converters = { new JsonStringEnumConverter() } }; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Sends a GET request to the specified as an asynchronous operation and returns the result. /// @@ -208,5 +203,4 @@ public class ApiHttpClient : IApiHttpClient throw new ApiException(problemDetails, response.StatusCode); } } - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/Api/IApiHttpClient.cs b/src/Lumina.Presentation.Web/Common/Api/IApiHttpClient.cs index c33b457b..7304556f 100644 --- a/src/Lumina.Presentation.Web/Common/Api/IApiHttpClient.cs +++ b/src/Lumina.Presentation.Web/Common/Api/IApiHttpClient.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Web.Common.Api; /// public interface IApiHttpClient { - #region ===================================================================== METHODS =================================================================================== /// /// Sends a GET request to the specified as an asynchronous operation and returns the result. /// @@ -75,5 +74,4 @@ public interface IApiHttpClient /// Cancellation token that can be used to stop the execution. /// The deserialized response containing the result of the POST request. Task PostAsync(string endpoint, TModel data, string? token = null, CancellationToken cancellationToken = default); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerConfiguration.cs b/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerConfiguration.cs index bc8d87ef..a99da909 100644 --- a/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerConfiguration.cs +++ b/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerConfiguration.cs @@ -10,7 +10,6 @@ namespace Lumina.Presentation.Web.Common.DependencyInjection; /// internal static class PresentationWebLayerConfiguration { - #region ===================================================================== METHODS =================================================================================== /// /// Extension method for registering the configuration options of the Lumina.Presentation.Web project into the Dependency Injection container. /// @@ -29,6 +28,5 @@ internal static class PresentationWebLayerConfiguration .ValidateOnStart(); return serviceCollection; } - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerServices.cs b/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerServices.cs index cc0331ff..16761764 100644 --- a/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerServices.cs +++ b/src/Lumina.Presentation.Web/Common/DependencyInjection/PresentationWebLayerServices.cs @@ -4,7 +4,6 @@ using Lumina.Presentation.Web.Common.Api; using Lumina.Presentation.Web.Common.Exceptions; using Lumina.Presentation.Web.Common.Filters; using Lumina.Presentation.Web.Common.Services; -using Lumina.Presentation.Web.Core.Services.UI; using Microsoft.Extensions.DependencyInjection; using Polly; using Polly.CircuitBreaker; @@ -23,7 +22,6 @@ namespace Lumina.Presentation.Web.Common.DependencyInjection; /// public static class PresentationWebLayerServices { - #region ===================================================================== METHODS =================================================================================== /// /// Registers the services of the Presentation Web layer into the dependency injection container. /// @@ -64,11 +62,9 @@ public static class PresentationWebLayerServices .AddPolicyHandler(retryPolicy) .AddPolicyHandler(circuitBreakerPolicy); - services.AddSingleton(); services.AddScoped(); services.AddScoped(); return services; } - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/Exceptions/ApiException.cs b/src/Lumina.Presentation.Web/Common/Exceptions/ApiException.cs index a658737a..48cbf41d 100644 --- a/src/Lumina.Presentation.Web/Common/Exceptions/ApiException.cs +++ b/src/Lumina.Presentation.Web/Common/Exceptions/ApiException.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Web.Common.Exceptions; /// public class ApiException : Exception { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the values of status codes defined for HTTP defined in RFC 2616 for HTTP 1.1. /// @@ -21,9 +20,7 @@ public class ApiException : Exception /// Gets or sets the problem details represented by this exception. /// public ProblemDetailsModel? ProblemDetails { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,5 +31,4 @@ public class ApiException : Exception ProblemDetails = problemDetails; HttpStatusCode = httpStatusCode; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Filters/ApiExceptionFilter.cs b/src/Lumina.Presentation.Web/Common/Filters/ApiExceptionFilter.cs index bd4efc97..9014c48d 100644 --- a/src/Lumina.Presentation.Web/Common/Filters/ApiExceptionFilter.cs +++ b/src/Lumina.Presentation.Web/Common/Filters/ApiExceptionFilter.cs @@ -21,7 +21,6 @@ namespace Lumina.Presentation.Web.Common.Filters; /// public class ApiExceptionFilter : IExceptionFilter { - #region ===================================================================== METHODS =================================================================================== /// /// Called after an action has thrown an Exception. /// @@ -103,5 +102,4 @@ public class ApiExceptionFilter : IExceptionFilter task.Wait(); // run the task synchronously httpContext.Response.Cookies.Delete("Token"); } - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/Models/Common/GenreModel.cs b/src/Lumina.Presentation.Web/Common/Models/Common/GenreModel.cs index cd110fa9..720293c9 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Common/GenreModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Common/GenreModel.cs @@ -10,10 +10,8 @@ namespace Lumina.Presentation.Web.Common.Models.Common; [DebuggerDisplay("{Name}")] public class GenreModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the genre element of the media item. /// public string? Name { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/Common/LanguageInfoModel.cs b/src/Lumina.Presentation.Web/Common/Models/Common/LanguageInfoModel.cs index 6b8d26ea..b37f37fa 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Common/LanguageInfoModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Common/LanguageInfoModel.cs @@ -10,7 +10,6 @@ namespace Lumina.Presentation.Web.Common.Models.Common; [DebuggerDisplay("{LanguageName}")] public class LanguageInfoModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the ISO 639-1 two-letter language code. /// @@ -25,5 +24,4 @@ public class LanguageInfoModel /// Gets an optional native name of the language. /// public string? NativeName { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/Common/NotificationModel.cs b/src/Lumina.Presentation.Web/Common/Models/Common/NotificationModel.cs index 3a807b8f..1540d60a 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Common/NotificationModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Common/NotificationModel.cs @@ -1,4 +1,4 @@ -#region ========================================================================= USING ===================================================================================== +#region ========================================================================= USING ===================================================================================== using Lumina.Presentation.Web.Common.Enums.Notifications; using System; #endregion @@ -11,4 +11,8 @@ namespace Lumina.Presentation.Web.Common.Models.Common; /// The id of the notification. /// The message of the notification. /// The type of the notification. -public record struct NotificationModel(Guid Id, string Message, NotificationType Type); \ No newline at end of file +public record struct NotificationModel( + Guid Id, + string Message, + NotificationType Type +); diff --git a/src/Lumina.Presentation.Web/Common/Models/Common/ProblemDetailsModel.cs b/src/Lumina.Presentation.Web/Common/Models/Common/ProblemDetailsModel.cs index 7466e2cc..548d4d91 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Common/ProblemDetailsModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Common/ProblemDetailsModel.cs @@ -13,7 +13,6 @@ namespace Lumina.Presentation.Web.Common.Models.Common; [DebuggerDisplay("{Title} ({Status})")] public class ProblemDetailsModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the URI reference that identifies the problem type. /// @@ -50,5 +49,4 @@ public class ProblemDetailsModel /// [JsonExtensionData] public IDictionary? Extensions { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/Common/RatingModel.cs b/src/Lumina.Presentation.Web/Common/Models/Common/RatingModel.cs index 23d7ed8e..f5058da3 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Common/RatingModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Common/RatingModel.cs @@ -10,7 +10,6 @@ namespace Lumina.Presentation.Web.Common.Models.Common; [DebuggerDisplay("{Value}/{MaxValue}")] public abstract class RatingModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the numeric value of the rating. /// @@ -25,5 +24,4 @@ public abstract class RatingModel /// Gets the optional number of votes or reviews this rating is based on. /// public int? VoteCount { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/Common/ReleaseInfoModel.cs b/src/Lumina.Presentation.Web/Common/Models/Common/ReleaseInfoModel.cs index b6c7470f..8aa2881d 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Common/ReleaseInfoModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Common/ReleaseInfoModel.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Web.Common.Models.Common; [DebuggerDisplay("{OriginalReleaseDate}")] public class ReleaseInfoModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the optional original release date of the media item. /// @@ -42,5 +41,4 @@ public class ReleaseInfoModel /// Gets the optional release version or edition. (e.g. "Original", "Director's Cut", "2.0") /// public string? ReleaseVersion { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/Common/TagModel.cs b/src/Lumina.Presentation.Web/Common/Models/Common/TagModel.cs index bb71a72a..d4df4e14 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Common/TagModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Common/TagModel.cs @@ -10,10 +10,8 @@ namespace Lumina.Presentation.Web.Common.Models.Common; [DebuggerDisplay("{Name}")] public class TagModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the tag element of the media item. /// public string? Name { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/Configuration/ServerConfigurationModel.cs b/src/Lumina.Presentation.Web/Common/Models/Configuration/ServerConfigurationModel.cs index 9256e530..14810584 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Configuration/ServerConfigurationModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Configuration/ServerConfigurationModel.cs @@ -10,11 +10,8 @@ namespace Lumina.Presentation.Web.Common.Models.Configuration; [DebuggerDisplay("{SECTION_NAME}")] public class ServerConfigurationModel { - #region ================================================================== FIELD MEMBERS ================================================================================ public const string SECTION_NAME = "ServerConfiguration"; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the remote API server path. /// @@ -29,5 +26,4 @@ public class ServerConfigurationModel /// Gets or sets the remote API server port. /// public required ushort Port { get; init; } - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/Models/FileManagement/BlobDataModel.cs b/src/Lumina.Presentation.Web/Common/Models/FileManagement/BlobDataModel.cs index 2117418a..16d29359 100644 --- a/src/Lumina.Presentation.Web/Common/Models/FileManagement/BlobDataModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/FileManagement/BlobDataModel.cs @@ -10,7 +10,6 @@ namespace Lumina.Presentation.Web.Common.Models.FileManagement; [DebuggerDisplay("{ContentType} (Data.Length)")] public class BlobDataModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the binary data as a byte array. /// @@ -20,5 +19,4 @@ public class BlobDataModel /// Gets or sets the content type (MIME type) of the blob data, such as "image/png" for an image or "application/pdf" for a PDF document. /// public string ContentType { get; set; } = null!; - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/FileManagement/DirectoryModel.cs b/src/Lumina.Presentation.Web/Common/Models/FileManagement/DirectoryModel.cs index 6a5c5e46..0f8d3186 100644 --- a/src/Lumina.Presentation.Web/Common/Models/FileManagement/DirectoryModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/FileManagement/DirectoryModel.cs @@ -11,10 +11,8 @@ namespace Lumina.Presentation.Web.Common.Models.FileManagement; [DebuggerDisplay("{Path}")] public class DirectoryModel : FileSystemItemModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the children items of the directory. /// public List Items { get; set; } = []; - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileModel.cs b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileModel.cs index b45db29d..23aec27b 100644 --- a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileModel.cs @@ -10,10 +10,8 @@ namespace Lumina.Presentation.Web.Common.Models.FileManagement; [DebuggerDisplay("{Path}")] public class FileModel : FileSystemItemModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the size of the file, in bytes /// public long Size { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemItemModel.cs b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemItemModel.cs index 7b30cff6..887cd2fa 100644 --- a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemItemModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemItemModel.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Web.Common.Models.FileManagement; [DebuggerDisplay("{Path}")] public abstract class FileSystemItemModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the full path to the file system item. /// @@ -31,5 +30,4 @@ public abstract class FileSystemItemModel /// Gets or sets the modification date of the file system item. /// public DateTime DateModified { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTreeNodeModel.cs b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTreeNodeModel.cs index 5cd0806b..d256b376 100644 --- a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTreeNodeModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTreeNodeModel.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Web.Common.Models.FileManagement; [DebuggerDisplay("{Path}")] public class FileSystemTreeNodeModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the full path of the file or directory. /// @@ -42,5 +41,4 @@ public class FileSystemTreeNodeModel /// Gets or sets the list of child nodes. /// public List Children { get; set; } = []; - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTypeModel.cs b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTypeModel.cs index c668f12e..b1da75e2 100644 --- a/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTypeModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/FileManagement/FileSystemTypeModel.cs @@ -11,10 +11,8 @@ namespace Lumina.Presentation.Web.Common.Models.FileManagement; [DebuggerDisplay("{PlatformType}")] public class FileSystemTypeModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the file system platform type. /// public PlatformType PlatformType { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/FileManagement/PathSegmentModel.cs b/src/Lumina.Presentation.Web/Common/Models/FileManagement/PathSegmentModel.cs index 1d790f03..1a7d5710 100644 --- a/src/Lumina.Presentation.Web/Common/Models/FileManagement/PathSegmentModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/FileManagement/PathSegmentModel.cs @@ -10,10 +10,8 @@ namespace Lumina.Presentation.Web.Common.Models.FileManagement; [DebuggerDisplay("{Path}")] public class PathSegmentModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the returned path. /// public string Path { get; set; } = null!; - #endregion } diff --git a/src/Lumina.Presentation.Web/Common/Models/Libraries/LibraryModel.cs b/src/Lumina.Presentation.Web/Common/Models/Libraries/LibraryModel.cs index fc7f81ba..bbf04841 100644 --- a/src/Lumina.Presentation.Web/Common/Models/Libraries/LibraryModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/Libraries/LibraryModel.cs @@ -13,7 +13,6 @@ namespace Lumina.Presentation.Web.Common.Models.Libraries; [DebuggerDisplay("{Title}")] public class LibraryModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the unique identifier of the library. /// @@ -33,5 +32,4 @@ public class LibraryModel /// Gets or sets the collection of directories that contain the library files. /// public List Paths { get; set; } = []; - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorModel.cs b/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorModel.cs index 0201f404..ef1c9c38 100644 --- a/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorModel.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Web.Common.Models.MediaContributors; [DebuggerDisplay("{Name}")] public class MediaContributorModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the contributor. /// @@ -21,5 +20,4 @@ public class MediaContributorModel /// Gets the role of the contributor. /// public MediaContributorRoleModel? Role { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorNameModel.cs b/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorNameModel.cs index 80952f3a..37b211c4 100644 --- a/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorNameModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorNameModel.cs @@ -10,7 +10,6 @@ namespace Lumina.Presentation.Web.Common.Models.MediaContributors; [DebuggerDisplay("{DisplayName}")] public class MediaContributorNameModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name by which the contributor is popularly known. /// @@ -20,5 +19,4 @@ public class MediaContributorNameModel /// Gets the legal name of the contributor. /// public string? LegalName { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorRoleModel.cs b/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorRoleModel.cs index 728887f3..a735b674 100644 --- a/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorRoleModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/MediaContributors/MediaContributorRoleModel.cs @@ -10,7 +10,6 @@ namespace Lumina.Presentation.Web.Common.Models.MediaContributors; [DebuggerDisplay("{Name}")] public class MediaContributorRoleModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the value representing this object. /// @@ -20,5 +19,4 @@ public class MediaContributorRoleModel /// Gets the category of this object. /// public string? Category { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/UI/ComboboxItem.cs b/src/Lumina.Presentation.Web/Common/Models/UI/ComboboxItem.cs index 0d8bc5b9..0168e431 100644 --- a/src/Lumina.Presentation.Web/Common/Models/UI/ComboboxItem.cs +++ b/src/Lumina.Presentation.Web/Common/Models/UI/ComboboxItem.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Web.Common.Models.UI; [DebuggerDisplay("{Text}")] public class ComboboxItem { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the text of the item, that is visible to the user. /// @@ -26,5 +25,4 @@ public class ComboboxItem /// Gets or sets the property indicating whether this element can be selected or not. /// public bool IsEnabled { get; set; } = true; - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookModel.cs b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookModel.cs index 03450de9..78883219 100644 --- a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookModel.cs @@ -13,7 +13,6 @@ namespace Lumina.Presentation.Web.Common.Models.WrittenContentLibrary.BookLibrar [DebuggerDisplay("{Title}")] public class BookModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the Id of the media item. /// @@ -204,5 +203,4 @@ public class BookModel /// Gets the optional time and date when the entity was updated. /// public DateTime? Updated { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookRatingModel.cs b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookRatingModel.cs index f6ce8cd0..3370d93a 100644 --- a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookRatingModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookRatingModel.cs @@ -12,10 +12,8 @@ namespace Lumina.Presentation.Web.Common.Models.WrittenContentLibrary.BookLibrar [DebuggerDisplay("{Value}/{MaxValue}")] public class BookRatingModel : RatingModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the source of the book rating (e.g., a specific website or platform). /// public BookRatingSource? Source { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookSeriesModel.cs b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookSeriesModel.cs index 81150b32..ef9ba60c 100644 --- a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookSeriesModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/BookSeriesModel.cs @@ -10,10 +10,8 @@ namespace Lumina.Presentation.Web.Common.Models.WrittenContentLibrary.BookLibrar [DebuggerDisplay("{Title}")] public class BookSeriesModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the title of the book series. /// public string? Title { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/IsbnModel.cs b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/IsbnModel.cs index 344bc48d..f0defca0 100644 --- a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/IsbnModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/BookLibrary/IsbnModel.cs @@ -11,7 +11,6 @@ namespace Lumina.Presentation.Web.Common.Models.WrittenContentLibrary.BookLibrar [DebuggerDisplay("{Value} ({Format})")] public class IsbnModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the ISBN value. /// @@ -21,5 +20,4 @@ public class IsbnModel /// Gets or sets the format of the ISBN (e.g., ISBN-10 or ISBN-13). /// public IsbnFormat? Format { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/WrittenContentMetadataModel.cs b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/WrittenContentMetadataModel.cs index a54939c2..36e33e09 100644 --- a/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/WrittenContentMetadataModel.cs +++ b/src/Lumina.Presentation.Web/Common/Models/WrittenContentLibrary/WrittenContentMetadataModel.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Web.Common.Models.WrittenContentLibrary; [DebuggerDisplay("{Title}")] public class WrittenContentMetadataModel { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the title of the written content. /// @@ -62,5 +61,4 @@ public class WrittenContentMetadataModel /// Gets or sets the number of pages in the written content. /// public int? PageCount { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Requests/WrittenContentLibrary/BookLibrary/AddBookRequest.cs b/src/Lumina.Presentation.Web/Common/Requests/WrittenContentLibrary/BookLibrary/AddBookRequest.cs index 068f283e..8af7c595 100644 --- a/src/Lumina.Presentation.Web/Common/Requests/WrittenContentLibrary/BookLibrary/AddBookRequest.cs +++ b/src/Lumina.Presentation.Web/Common/Requests/WrittenContentLibrary/BookLibrary/AddBookRequest.cs @@ -13,7 +13,6 @@ namespace Lumina.Presentation.Web.Common.Requests.WrittenContentLibrary.BookLibr /// public class AddBookRequest { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets or sets the written content metadata of the book. /// @@ -98,5 +97,4 @@ public class AddBookRequest /// Gets or sets the list of ratings for this book. /// public List? Ratings { get; set; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Services/INotificationService.cs b/src/Lumina.Presentation.Web/Common/Services/INotificationService.cs index 1f015589..d5b896d3 100644 --- a/src/Lumina.Presentation.Web/Common/Services/INotificationService.cs +++ b/src/Lumina.Presentation.Web/Common/Services/INotificationService.cs @@ -11,16 +11,12 @@ namespace Lumina.Presentation.Web.Common.Services; /// public interface INotificationService { - #region ================================================================== FIELD MEMBERS ================================================================================ event Action? OnNotification; - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Shows a notification. /// /// The message of the notification. /// The type of the notification. void Show(string message, NotificationType type); - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Services/NotificationService.cs b/src/Lumina.Presentation.Web/Common/Services/NotificationService.cs index 6e2f0de8..2313c776 100644 --- a/src/Lumina.Presentation.Web/Common/Services/NotificationService.cs +++ b/src/Lumina.Presentation.Web/Common/Services/NotificationService.cs @@ -11,11 +11,8 @@ namespace Lumina.Presentation.Web.Common.Services; /// public class NotificationService : INotificationService { - #region ================================================================== FIELD MEMBERS ================================================================================ public event Action? OnNotification; - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Shows a notification. /// @@ -25,5 +22,4 @@ public class NotificationService : INotificationService { OnNotification?.Invoke(new NotificationModel { Message = message, Type = type, Id = Guid.NewGuid() }); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs b/src/Lumina.Presentation.Web/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs index fd983114..692713ab 100644 --- a/src/Lumina.Presentation.Web/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs +++ b/src/Lumina.Presentation.Web/Common/Utilities/OptionsBuilderFluentValidationUtilities.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Web.Common.Utilities; /// public static class OptionsBuilderFluentValidationUtilities { - #region ================================================================== METHODS =================================================================================== /// /// Extension method to add fluent validation to the options validation pipeline. /// @@ -29,5 +28,4 @@ public static class OptionsBuilderFluentValidationUtilities serviceProvider => new FluentValidationOptions(optionsBuilder.Name, serviceProvider.GetRequiredService>())); return optionsBuilder; } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Utilities/StringUtilities.cs b/src/Lumina.Presentation.Web/Common/Utilities/StringUtilities.cs deleted file mode 100644 index 1451907e..00000000 --- a/src/Lumina.Presentation.Web/Common/Utilities/StringUtilities.cs +++ /dev/null @@ -1,23 +0,0 @@ -#region ========================================================================= USING ===================================================================================== -using System.Text.RegularExpressions; -#endregion - -namespace Lumina.Presentation.Web.Common.Utilities; - -/// -/// Extension methods for strings. -/// -public static class StringUtilities -{ - #region ================================================================== METHODS =================================================================================== - /// - /// Splits a camel case string into separate words. - /// - /// The string to be split. - /// The split string. - public static string SplitCamelCase(this string input) - { - return Regex.Replace(input, "([A-Z])", " $1", RegexOptions.Compiled).Trim(); - } - #endregion -} \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Common/Validation/FluentValidationOptions.cs b/src/Lumina.Presentation.Web/Common/Validation/FluentValidationOptions.cs index 43e3e4ba..5d6cbe1d 100644 --- a/src/Lumina.Presentation.Web/Common/Validation/FluentValidationOptions.cs +++ b/src/Lumina.Presentation.Web/Common/Validation/FluentValidationOptions.cs @@ -13,18 +13,13 @@ namespace Lumina.Presentation.Web.Common.Validation; /// The type of options being validated. public class FluentValidationOptions : IValidateOptions where TOptions : class { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IValidator _validator; - #endregion - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the name of the options being validated. /// public string? Name { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +30,7 @@ public class FluentValidationOptions : IValidateOptions wher Name = name; _validator = validator; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Validates the specified . /// @@ -61,10 +54,9 @@ public class FluentValidationOptions : IValidateOptions wher // if the validation fails, collect the error messages // TODO: add translation support for the error messages string[] errors = validationResult.Errors.Select(x => $"Options validation failed for '{x.PropertyName}' with error: '{x.ErrorMessage}'") - .ToArray(); + .ToArray(); // and return them with a failure result return ValidateOptionsResult.Fail(errors); } - #endregion -} \ No newline at end of file +} diff --git a/src/Lumina.Presentation.Web/Common/Validators/ServerConfigurationModelValidator.cs b/src/Lumina.Presentation.Web/Common/Validators/ServerConfigurationModelValidator.cs index 3e00cc8f..17dcb612 100644 --- a/src/Lumina.Presentation.Web/Common/Validators/ServerConfigurationModelValidator.cs +++ b/src/Lumina.Presentation.Web/Common/Validators/ServerConfigurationModelValidator.cs @@ -10,7 +10,6 @@ namespace Lumina.Presentation.Web.Common.Validators; /// public class ServerConfigurationModelValidator : AbstractValidator { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -20,5 +19,4 @@ public class ServerConfigurationModelValidator : AbstractValidator x.Port).InclusiveBetween((ushort)0, (ushort)65535).WithMessage("Port number must be between 0 and 65535!"); RuleFor(x => x.ApiVersion).InclusiveBetween((char)0, (char)255).WithMessage("API version must be between 0 and 255!"); } - #endregion } \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Controllers/FileManagement/DirectoriesController.cs b/src/Lumina.Presentation.Web/Controllers/FileManagement/DirectoriesController.cs index 03e1e9d6..8dbb6fc7 100644 --- a/src/Lumina.Presentation.Web/Controllers/FileManagement/DirectoriesController.cs +++ b/src/Lumina.Presentation.Web/Controllers/FileManagement/DirectoriesController.cs @@ -17,11 +17,8 @@ namespace Lumina.Presentation.Web.Controllers.FileManagement; [Route("[controller]")] public class DirectoriesController : Controller { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IApiHttpClient _apiHttpClient; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class DirectoriesController : Controller { _apiHttpClient = apiHttpClient; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the directories of . /// @@ -83,5 +78,4 @@ public class DirectoriesController : Controller FileSystemTreeNodeModel[] response = await _apiHttpClient.GetAsync($"directories/get-directory-tree?path={Uri.EscapeDataString(path)}&includeFiles={includeFiles}&includeHiddenElements={includeHiddenElements}", cancellationToken: cancellationToken); return Json(new { success = true, data = new { tree = response } }); } - #endregion } diff --git a/src/Lumina.Presentation.Web/Controllers/FileManagement/DrivesController.cs b/src/Lumina.Presentation.Web/Controllers/FileManagement/DrivesController.cs index 3dc9fe7e..66e913d4 100644 --- a/src/Lumina.Presentation.Web/Controllers/FileManagement/DrivesController.cs +++ b/src/Lumina.Presentation.Web/Controllers/FileManagement/DrivesController.cs @@ -14,11 +14,8 @@ namespace Lumina.Presentation.Web.Controllers.FileManagement; [Route("[controller]")] public class DrivesController : Controller { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IApiHttpClient _apiHttpClient; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -27,9 +24,7 @@ public class DrivesController : Controller { _apiHttpClient = apiHttpClient; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Controller action for getting the list of all file system drives. /// @@ -40,5 +35,4 @@ public class DrivesController : Controller FileSystemTreeNodeModel[] response = await _apiHttpClient.GetAsync($"drives/get-drives", cancellationToken: cancellationToken); return Json(new { success = true, data = new { drives = response } }); } - #endregion } diff --git a/src/Lumina.Presentation.Web/Controllers/FileManagement/FileSystemController.cs b/src/Lumina.Presentation.Web/Controllers/FileManagement/FileSystemController.cs index 885e6e1b..4488a63f 100644 --- a/src/Lumina.Presentation.Web/Controllers/FileManagement/FileSystemController.cs +++ b/src/Lumina.Presentation.Web/Controllers/FileManagement/FileSystemController.cs @@ -14,11 +14,8 @@ namespace Lumina.Presentation.Web.Controllers.FileManagement; [Route("/file-system")] public class FileSystemController : Controller { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IApiHttpClient _apiHttpClient; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -27,9 +24,7 @@ public class FileSystemController : Controller { _apiHttpClient = apiHttpClient; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the type of the file system. /// @@ -40,5 +35,4 @@ public class FileSystemController : Controller FileSystemTypeModel response = await _apiHttpClient.GetAsync($"file-system/get-type", cancellationToken: cancellationToken); return Json(new { success = true, data = new { platformType = response.PlatformType.ToString() } }); } - #endregion } diff --git a/src/Lumina.Presentation.Web/Controllers/FileManagement/FilesController.cs b/src/Lumina.Presentation.Web/Controllers/FileManagement/FilesController.cs index 410c3976..ed263306 100644 --- a/src/Lumina.Presentation.Web/Controllers/FileManagement/FilesController.cs +++ b/src/Lumina.Presentation.Web/Controllers/FileManagement/FilesController.cs @@ -16,11 +16,8 @@ namespace Lumina.Presentation.Web.Controllers.FileManagement; [Route("[controller]")] public class FilesController : Controller { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IApiHttpClient _apiHttpClient; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class FilesController : Controller { _apiHttpClient = apiHttpClient; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the files of . /// @@ -69,5 +64,4 @@ public class FilesController : Controller yield return file; } } - #endregion } diff --git a/src/Lumina.Presentation.Web/Controllers/FileManagement/PathController.cs b/src/Lumina.Presentation.Web/Controllers/FileManagement/PathController.cs index ab031803..1d7b2299 100644 --- a/src/Lumina.Presentation.Web/Controllers/FileManagement/PathController.cs +++ b/src/Lumina.Presentation.Web/Controllers/FileManagement/PathController.cs @@ -15,11 +15,8 @@ namespace Lumina.Presentation.Web.Controllers.FileManagement; [Route("[controller]")] public class PathController : Controller { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IApiHttpClient _apiHttpClient; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -28,9 +25,7 @@ public class PathController : Controller { _apiHttpClient = apiHttpClient; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Gets the root of . /// @@ -102,5 +97,4 @@ public class PathController : Controller PathExistsModel response = await _apiHttpClient.GetAsync($"path/check-path-exists?path={Uri.EscapeDataString(path)}&includeHiddenElements={includeHiddenElements}", cancellationToken: cancellationToken); return Json(new { success = true, data = new { exists = response.Exists } }); } - #endregion } diff --git a/src/Lumina.Presentation.Web/Core/Services/UI/ComboboxService.cs b/src/Lumina.Presentation.Web/Core/Services/UI/ComboboxService.cs deleted file mode 100644 index 4835597e..00000000 --- a/src/Lumina.Presentation.Web/Core/Services/UI/ComboboxService.cs +++ /dev/null @@ -1,27 +0,0 @@ -#region ========================================================================= USING ===================================================================================== -using System; -using System.Threading.Tasks; -#endregion - -namespace Lumina.Presentation.Web.Core.Services.UI; - -/// -/// Service for managing comboboxes. -/// -public class ComboboxService -{ - #region ================================================================== FIELD MEMBERS ================================================================================ - public event Func? ComboboxOpened; - #endregion - - #region ===================================================================== METHODS =================================================================================== - /// - /// Notifies that a combobox has been opened. - /// - /// The id of the combobox that opened. - public void NotifyComboboxOpened(string id) - { - ComboboxOpened?.Invoke(id); - } - #endregion -} \ No newline at end of file diff --git a/src/Lumina.Presentation.Web/Program.cs b/src/Lumina.Presentation.Web/Program.cs index c04dba24..8507bb91 100644 --- a/src/Lumina.Presentation.Web/Program.cs +++ b/src/Lumina.Presentation.Web/Program.cs @@ -13,7 +13,6 @@ namespace Lumina.Presentation.Web; /// public class Program { - #region ===================================================================== METHODS =================================================================================== /// /// Application entry point. /// @@ -48,5 +47,4 @@ public class Program await app.RunAsync(); } - #endregion } diff --git a/src/Lumina.Presentation.Web/ViewComponents/FileSystemBrowserViewComponent.cs b/src/Lumina.Presentation.Web/ViewComponents/FileSystemBrowserViewComponent.cs index 8dc53dd2..271c6d12 100644 --- a/src/Lumina.Presentation.Web/ViewComponents/FileSystemBrowserViewComponent.cs +++ b/src/Lumina.Presentation.Web/ViewComponents/FileSystemBrowserViewComponent.cs @@ -14,11 +14,8 @@ namespace Lumina.Presentation.Web.ViewComponents; /// public class FileSystemBrowserViewComponent : ViewComponent { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ServerConfigurationModel _serverConfigurationModel; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -27,9 +24,7 @@ public class FileSystemBrowserViewComponent : ViewComponent { _serverConfigurationModel = serverConfigurationModelOptions.Value; } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Invokes the view component. /// @@ -47,5 +42,4 @@ public class FileSystemBrowserViewComponent : ViewComponent IconSize = FileSystemIconSize.Large }); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs index 07b097b9..b3b46bc5 100644 --- a/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs +++ b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs @@ -11,7 +11,6 @@ namespace Lumina.DataAccess.IntegrationTests.Core.Repositories.Common.Factory; [ExcludeFromCodeCoverage] public class RepositoryFactoryTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void RepositoryFactoryImplementsRepositoryFactoryInterface_InterfaceIsImplemented_ReturnsTrue() { @@ -21,5 +20,4 @@ public class RepositoryFactoryTests // Assert Assert.True(repositoryFactory is IRepositoryFactory); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/UoW/UnitOfWorkTests.cs b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/UoW/UnitOfWorkTests.cs index 2d6645d2..8f3ca813 100644 --- a/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/UoW/UnitOfWorkTests.cs +++ b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/UoW/UnitOfWorkTests.cs @@ -15,7 +15,6 @@ namespace Lumina.DataAccess.IntegrationTests.Core.UoW; [ExcludeFromCodeCoverage] public class UnitOfWorkTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void UnitOfWorkImplementsUnitOfWorkInterface_InterfaceIsImplemented_ReturnsTrue() { @@ -28,5 +27,4 @@ public class UnitOfWorkTests // Assert Assert.True(unitOfWork is IUnitOfWork); } - #endregion } \ No newline at end of file diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Converters/BookJsonConverter.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Converters/BookJsonConverter.cs index 7d775853..6dc309fc 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Converters/BookJsonConverter.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Converters/BookJsonConverter.cs @@ -22,7 +22,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Converters; [ExcludeFromCodeCoverage] public class BookJsonConverter : JsonConverter { - #region ===================================================================== METHODS =================================================================================== /// /// Reads and converts JSON to a object. /// @@ -281,5 +280,4 @@ public class BookJsonConverter : JsonConverter ).Value) .ToList(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/BogusExtensions.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/BogusExtensions.cs index 779edcaa..85e4f2e2 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/BogusExtensions.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/BogusExtensions.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup; [ExcludeFromCodeCoverage] public static class BogusExtensions { - #region ===================================================================== METHODS =================================================================================== /// /// Adds random data generation support to the class. /// @@ -36,5 +35,4 @@ public static class BogusExtensions DateTime endDateTime = end.ToDateTime(TimeOnly.MinValue); return System.DateOnly.FromDateTime(faker.Date.Between(startDateTime, endDateTime)); } - #endregion } \ No newline at end of file diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/DateOnlySpecimenBuilder.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/DateOnlySpecimenBuilder.cs index 2b65a9c8..4a356aa5 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/DateOnlySpecimenBuilder.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/DateOnlySpecimenBuilder.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup; [ExcludeFromCodeCoverage] public class DateOnlySpecimenBuilder : ISpecimenBuilder { - #region ===================================================================== METHODS =================================================================================== /// /// Adds support to the AutoFixture library. /// @@ -25,5 +24,4 @@ public class DateOnlySpecimenBuilder : ISpecimenBuilder return DateOnly.FromDateTime(DateTime.Now); return new NoSpecimen(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/LuminaApiFactory.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/LuminaApiFactory.cs index 34078ed4..7f7d0368 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/LuminaApiFactory.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/LuminaApiFactory.cs @@ -20,11 +20,8 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup; [ExcludeFromCodeCoverage] public class LuminaApiFactory : WebApplicationFactory, IDisposable { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly SqliteConnection _connection; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,9 +30,7 @@ public class LuminaApiFactory : WebApplicationFactory, IDisposable _connection = new SqliteConnection("DataSource=:memory:"); _connection.Open(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Configures the web host for the integration tests. /// @@ -69,5 +64,4 @@ public class LuminaApiFactory : WebApplicationFactory, IDisposable _connection.Close(); base.Dispose(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs index e30282ea..1d827c15 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs @@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup; [ExcludeFromCodeCoverage] public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder { - #region ===================================================================== METHODS =================================================================================== /// /// Adds support to the AutoFixture library. /// @@ -25,5 +24,4 @@ public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder return (DateOnly?)DateOnly.FromDateTime(DateTime.Now); return new NoSpecimen(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs index 77df7b0b..d271f74c 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs @@ -26,7 +26,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class DirectoriesControllerTests : IClassFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly HttpClient _client; private readonly JsonSerializerOptions _jsonOptions = new() { @@ -35,9 +34,7 @@ public class DirectoriesControllerTests : IClassFixture Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -46,9 +43,7 @@ public class DirectoriesControllerTests : IClassFixture { _client = apiFactory.CreateClient(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetDirectoryTree_WhenCalledWithValidPathAndIncludeFilesAndNotIncludeHiddenElements_ShouldReturnDirectoryTreeWithFilesAndNotHiddenElements() { @@ -641,5 +636,4 @@ public class DirectoriesControllerTests : IClassFixture fileSystemFixture.CleanupFileSystemStructure(); } } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DrivesControllerTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DrivesControllerTests.cs index 9ea1891d..0506b51e 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DrivesControllerTests.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/DrivesControllerTests.cs @@ -24,7 +24,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class DrivesControllerTests : IClassFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly HttpClient _client; private readonly JsonSerializerOptions _jsonOptions = new() { @@ -33,9 +32,7 @@ public class DrivesControllerTests : IClassFixture Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -44,9 +41,7 @@ public class DrivesControllerTests : IClassFixture { _client = apiFactory.CreateClient(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetDrives_WhenCalled_ShouldReturnDrives() @@ -81,5 +76,4 @@ public class DrivesControllerTests : IClassFixture firstDrive.ItemType.Should().Be(FileSystemItemType.Root); drives.Count.Should().BeGreaterThanOrEqualTo(1); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs index c1c43cf5..329aa1a2 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs @@ -25,7 +25,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class FileSystemControllerTests : IClassFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly HttpClient _client; private readonly JsonSerializerOptions _jsonOptions = new() { @@ -33,9 +32,7 @@ public class FileSystemControllerTests : IClassFixture PropertyNameCaseInsensitive = true, Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -44,9 +41,7 @@ public class FileSystemControllerTests : IClassFixture { _client = apiFactory.CreateClient(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetType_WhenCalled_ShouldReturnOkResultWithFileSystemTypeResponse() { @@ -95,5 +90,4 @@ public class FileSystemControllerTests : IClassFixture // Assert await act.Should().NotThrowAsync(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FilesControllerTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FilesControllerTests.cs index 0011b252..478db481 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FilesControllerTests.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/FilesControllerTests.cs @@ -25,7 +25,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class FilesControllerTests : IClassFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly HttpClient _client; private readonly JsonSerializerOptions _jsonOptions = new() { @@ -34,9 +33,7 @@ public class FilesControllerTests : IClassFixture Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -45,9 +42,7 @@ public class FilesControllerTests : IClassFixture { _client = apiFactory.CreateClient(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetTreeFiles_WhenCalledWithValidPathAndNotIncludeHiddenElements_ShouldReturnTreeFilesWithoutHiddenElements() { @@ -331,5 +326,4 @@ public class FilesControllerTests : IClassFixture fileSystemFixture.CleanupFileSystemStructure(); } } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemStructureFixture.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemStructureFixture.cs index 7dff3a76..659627df 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemStructureFixture.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemStructureFixture.cs @@ -13,12 +13,9 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class FileSystemStructureFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly string _rootPath; private readonly Faker _faker = new(); - #endregion - #region ===================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class FileSystemStructureFixture { _rootPath = Path.Combine(AppContext.BaseDirectory, "TestFileSystemStructure_" + Guid.NewGuid()); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a file system structure with three nested directories, each containing two text files. @@ -93,5 +88,4 @@ public class FileSystemStructureFixture if (Directory.Exists(_rootPath)) Directory.Delete(_rootPath, recursive: true); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs index 70d1b3f1..afa4b15f 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs @@ -15,11 +15,8 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class FileSystemTreeNodeResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a single with a nested structure. /// @@ -58,5 +55,4 @@ public class FileSystemTreeNodeResponseFixture { return Enumerable.Range(0, count).Select(_ => Create(0, maxDepth, maxChildren)).ToList(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/TestImageFixture.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/TestImageFixture.cs index a6b64320..553bb330 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/TestImageFixture.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/Fixtures/TestImageFixture.cs @@ -15,14 +15,11 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class TestImageFixture : IDisposable { - #region ==================================================================== PROPERTIES ================================================================================= /// /// Gets the path of the created test image. /// public string ImagePath { get; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +28,7 @@ public class TestImageFixture : IDisposable ImagePath = Path.Combine(Path.GetTempPath(), $"TestImage_{Guid.NewGuid()}.jpg"); CreateTestImage(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a test image file. /// @@ -51,5 +46,4 @@ public class TestImageFixture : IDisposable if (File.Exists(ImagePath)) File.Delete(ImagePath); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/PathControllerTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/PathControllerTests.cs index 119d9fb6..73fd421f 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/PathControllerTests.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/PathControllerTests.cs @@ -26,7 +26,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class PathControllerTests : IClassFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly HttpClient _client; private readonly JsonSerializerOptions _jsonOptions = new() { @@ -35,9 +34,7 @@ public class PathControllerTests : IClassFixture Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -46,9 +43,7 @@ public class PathControllerTests : IClassFixture { _client = apiFactory.CreateClient(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetPathRoot_WhenCalledWithValidPath_ShouldReturnOkResultWithPathSegmentResponse() { @@ -636,5 +631,4 @@ public class PathControllerTests : IClassFixture // Assert await act.Should().ThrowAsync(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs index 76d37a40..3c2900ed 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs @@ -21,7 +21,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme [ExcludeFromCodeCoverage] public class ThumbnailsControllerTests : IClassFixture, IClassFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly HttpClient _client; private readonly JsonSerializerOptions _jsonOptions = new() { @@ -30,9 +29,7 @@ public class ThumbnailsControllerTests : IClassFixture, IClass Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; private readonly string _testImagePath; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -43,9 +40,7 @@ public class ThumbnailsControllerTests : IClassFixture, IClass _client = apiFactory.CreateClient(); _testImagePath = imageFixture.ImagePath; } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetThumbnail_WhenCalledWithValidPathAndQuality_ShouldReturnOkResultWithThumbnail() { @@ -132,5 +127,4 @@ public class ThumbnailsControllerTests : IClassFixture, IClass // Assert await act.Should().ThrowAsync(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksControllerTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksControllerTests.cs index ea89c6f6..936fe778 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksControllerTests.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/BooksControllerTests.cs @@ -28,14 +28,11 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.WrittenConte [ExcludeFromCodeCoverage] public class BooksControllerTests : IClassFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly LuminaApiFactory _apiFactory; private readonly HttpClient _client; private readonly AddBookRequestFixture _requestBookFixture; private readonly JsonSerializerOptions _jsonOptions = new(); - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -47,9 +44,7 @@ public class BooksControllerTests : IClassFixture _requestBookFixture = new AddBookRequestFixture(); _jsonOptions.Converters.Add(new BookJsonConverter()); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetBooks_WhenCalled_ShouldReturnBooks() { @@ -1615,5 +1610,4 @@ public class BooksControllerTests : IClassFixture response.StatusCode.Should().Be(HttpStatusCode.Created); bookResponse.Should().NotBeNull(); } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/AddBookRequestFixture.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/AddBookRequestFixture.cs index 74cbe17b..402f05ce 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/AddBookRequestFixture.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/AddBookRequestFixture.cs @@ -22,13 +22,10 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.Books.Fixtur [ExcludeFromCodeCoverage] public class AddBookRequestFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Fixture _fixture; private readonly Random _random = new(); private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -39,9 +36,7 @@ public class AddBookRequestFixture _fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder()); _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid request to add a book. /// @@ -345,5 +340,4 @@ public class AddBookRequestFixture { return input?.Length > maxLength ? input[..maxLength] : input; } - #endregion } diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/DomainBookFixture.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/DomainBookFixture.cs index cd263b6c..7bad9004 100644 --- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/DomainBookFixture.cs +++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Controllers/WrittenContentLibrary/BookLibrary/Books/Fixtures/DomainBookFixture.cs @@ -21,11 +21,8 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.Books.Fixtur [ExcludeFromCodeCoverage] public class DomainBookFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Fixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -36,9 +33,7 @@ public class DomainBookFixture _fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder()); ConfigureCustomDomainTypes(); } - #endregion - #region ===================================================================== METHODS =================================================================================== public Book CreateDomainBook() { return Book.Create( @@ -109,5 +104,4 @@ public class DomainBookFixture _fixture.Create>() ).Value); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Behaviors/ValidationBehaviorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Behaviors/ValidationBehaviorTests.cs index c0d06549..3783a64c 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Behaviors/ValidationBehaviorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Behaviors/ValidationBehaviorTests.cs @@ -21,12 +21,9 @@ namespace Lumina.Application.UnitTests.Common.Behaviors; [ExcludeFromCodeCoverage] public class ValidationBehaviorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IValidator _mockValidator; private readonly MessageHandlerDelegate> _nextDelegate; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +32,7 @@ public class ValidationBehaviorTests _mockValidator = Substitute.For>(); _nextDelegate = Substitute.For>>(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenValidatorIsNull_ShouldInvokeNextDelegate() { @@ -102,5 +97,4 @@ public class ValidationBehaviorTests await _mockValidator.Received(1).ValidateAsync(request, Arg.Any()); await _nextDelegate.DidNotReceive().Invoke(request, Arg.Any()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterFactoryTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterFactoryTests.cs index 5edfcce1..7ff52afb 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterFactoryTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterFactoryTests.cs @@ -18,11 +18,8 @@ namespace Lumina.Application.UnitTests.Common.Converters; [ExcludeFromCodeCoverage] public class OptionalJsonConverterFactoryTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly OptionalJsonConverterFactory _factory; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class OptionalJsonConverterFactoryTests { _factory = new OptionalJsonConverterFactory(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void CanConvert_WhenTypeIsOptional_ShouldReturnTrue() { @@ -113,5 +108,4 @@ public class OptionalJsonConverterFactoryTests // Assert converter.Should().BeOfType>(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterTests.cs index e9846124..0114ddfc 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Converters/OptionalJsonConverterTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Common.Converters; [ExcludeFromCodeCoverage] public class OptionalJsonConverterTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly JsonSerializerOptions _options; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -28,9 +25,7 @@ public class OptionalJsonConverterTests _options.Converters.Add(new OptionalJsonConverter()); _options.Converters.Add(new OptionalJsonConverter()); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Read_WhenJsonIsNull_ShouldReturnNone() { @@ -138,5 +133,4 @@ public class OptionalJsonConverterTests // Assert deserialized.Should().Be(original); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/DirectoryMappingConfigTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/DirectoryMappingConfigTests.cs index 9abd16fd..50a5b555 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/DirectoryMappingConfigTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/DirectoryMappingConfigTests.cs @@ -20,13 +20,10 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement; [ExcludeFromCodeCoverage] public class DirectoryMappingConfigTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly TypeAdapterConfig _config; private readonly DirectoryMappingConfig _directoryMappingConfig; private readonly FileSystemTreeMappingConfig _fileSystemTreeMappingConfig; - #endregion - #region ====================================================================== CTOR ===================================================================================== public DirectoryMappingConfigTests() { _config = new TypeAdapterConfig(); @@ -35,9 +32,7 @@ public class DirectoryMappingConfigTests _directoryMappingConfig.Register(_config); _fileSystemTreeMappingConfig.Register(_config); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Register_WhenMappingDirectoryToFileSystemTreeNodeResponse_ShouldMapCorrectly() { @@ -115,5 +110,4 @@ public class DirectoryMappingConfigTests result.DateCreated.Should().BeOnOrAfter(beforeMapping).And.BeOnOrBefore(afterMapping); result.DateModified.Should().BeOnOrAfter(beforeMapping).And.BeOnOrBefore(afterMapping); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileMappingConfigTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileMappingConfigTests.cs index 0a78789b..70dccc48 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileMappingConfigTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileMappingConfigTests.cs @@ -16,13 +16,10 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement; [ExcludeFromCodeCoverage] public class FileMappingConfigTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly TypeAdapterConfig _config; private readonly FileMappingConfig _fileMappingConfig; private readonly FileSystemTreeMappingConfig _fileSystemTreeMappingConfig; - #endregion - #region ====================================================================== CTOR ===================================================================================== public FileMappingConfigTests() { _config = new TypeAdapterConfig(); @@ -31,9 +28,7 @@ public class FileMappingConfigTests _fileMappingConfig.Register(_config); _fileSystemTreeMappingConfig.Register(_config); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Register_WhenMappingFileToFileSystemTreeNodeResponse_ShouldMapCorrectly() { @@ -91,5 +86,4 @@ public class FileMappingConfigTests result.DateModified.Should().Be(default); result.Size.Should().Be(file.Size); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileSystemTreeMappingConfigTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileSystemTreeMappingConfigTests.cs index 2747f23e..ed8fd17f 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileSystemTreeMappingConfigTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/FileSystemTreeMappingConfigTests.cs @@ -18,21 +18,16 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement; [ExcludeFromCodeCoverage] public class FileSystemTreeMappingConfigTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly TypeAdapterConfig _config; private readonly FileSystemTreeMappingConfig _fileSystemTreeMappingConfig; - #endregion - #region ====================================================================== CTOR ===================================================================================== public FileSystemTreeMappingConfigTests() { _config = new TypeAdapterConfig(); _fileSystemTreeMappingConfig = new FileSystemTreeMappingConfig(); _fileSystemTreeMappingConfig.Register(_config); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Register_WhenMappingWindowsRootItemToFileSystemTreeNodeResponse_ShouldMapCorrectly() { @@ -160,5 +155,4 @@ public class FileSystemTreeMappingConfigTests result.ChildrenLoaded.Should().BeFalse(); result.Children.Should().BeEmpty(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/PathSegmentMappingConfigTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/PathSegmentMappingConfigTests.cs index 4d687d7e..525475a9 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/PathSegmentMappingConfigTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/PathSegmentMappingConfigTests.cs @@ -17,21 +17,16 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement; [ExcludeFromCodeCoverage] public class PathSegmentMappingConfigTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly TypeAdapterConfig _config; private readonly PathSegmentMappingConfig _pathSegmentMappingConfig; - #endregion - #region ====================================================================== CTOR ===================================================================================== public PathSegmentMappingConfigTests() { _config = new TypeAdapterConfig(); _pathSegmentMappingConfig = new PathSegmentMappingConfig(); _pathSegmentMappingConfig.Register(_config); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Register_WhenMappingPathSegmentToPathSegmentResponse_ShouldMapCorrectly() { @@ -90,5 +85,4 @@ public class PathSegmentMappingConfigTests results[i].Path.Should().Be(pathSegments[i].Name); } } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/ThumbnailMappingConfigTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/ThumbnailMappingConfigTests.cs index 8e00ca94..eddeb3e5 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/ThumbnailMappingConfigTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileManagement/ThumbnailMappingConfigTests.cs @@ -18,13 +18,10 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement; [ExcludeFromCodeCoverage] public class ThumbnailMappingConfigTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly TypeAdapterConfig _config; private readonly ThumbnailMappingConfig _thumbnailMappingConfig; private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== public ThumbnailMappingConfigTests() { _config = new TypeAdapterConfig(); @@ -32,9 +29,7 @@ public class ThumbnailMappingConfigTests _thumbnailMappingConfig.Register(_config); _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Register_WhenMappingThumbnailToThumbnailResponse_ShouldMapCorrectly() { @@ -111,5 +106,4 @@ public class ThumbnailMappingConfigTests results[i].Bytes.Should().BeEquivalentTo(thumbnails[i].Bytes); } } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/BogusExtensions.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/BogusExtensions.cs index 6457004d..ae6af416 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/BogusExtensions.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/BogusExtensions.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Common.Setup; [ExcludeFromCodeCoverage] public static class BogusExtensions { - #region ===================================================================== METHODS =================================================================================== /// /// Adds random data generation support to the class. /// @@ -36,5 +35,4 @@ public static class BogusExtensions DateTime endDateTime = end.ToDateTime(TimeOnly.MinValue); return System.DateOnly.FromDateTime(faker.Date.Between(startDateTime, endDateTime)); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs index 161dedb1..0caf419a 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Common.Setup; [ExcludeFromCodeCoverage] public class DateOnlySpecimenBuilder : ISpecimenBuilder { - #region ===================================================================== METHODS =================================================================================== /// /// Adds support to the AutoFixture library. /// @@ -25,5 +24,4 @@ public class DateOnlySpecimenBuilder : ISpecimenBuilder return DateOnly.FromDateTime(DateTime.Now); return new NoSpecimen(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs index 3d66c55f..83f3931f 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Common.Setup; [ExcludeFromCodeCoverage] public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder { - #region ===================================================================== METHODS =================================================================================== /// /// Adds support to the AutoFixture library. /// @@ -25,5 +24,4 @@ public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder return (DateOnly?)DateOnly.FromDateTime(DateTime.Now); return new NoSpecimen(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryFixture.cs index 20e1f772..5bae115b 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryFixture.cs @@ -19,11 +19,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures; [ExcludeFromCodeCoverage] public class DirectoryFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +28,7 @@ public class DirectoryFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -112,5 +107,4 @@ public class DirectoryFixture } return CreateDirectory(childItems: childItems); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryResponseFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryResponseFixture.cs index 053d0b32..c3ef71d8 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryResponseFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/DirectoryResponseFixture.cs @@ -14,12 +14,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures; [ExcludeFromCodeCoverage] public class DirectoryResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); private readonly FileSystemItemModelFixture _fileSystemItemModelFixture = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -46,5 +43,4 @@ public class DirectoryResponseFixture { return Enumerable.Range(0, count).Select(_ => Create(itemCount)).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemItemModelFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemItemModelFixture.cs index d14fa2f0..d4c0a014 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemItemModelFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemItemModelFixture.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures; [ExcludeFromCodeCoverage] public class FileSystemItemModelFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -42,5 +39,4 @@ public class FileSystemItemModelFixture { return Enumerable.Range(0, count).Select(_ => Create()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemTreeNodeResponseFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemTreeNodeResponseFixture.cs index 39fc0d8f..ff713dd6 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemTreeNodeResponseFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Fixtures/FileSystemTreeNodeResponseFixture.cs @@ -15,11 +15,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures; [ExcludeFromCodeCoverage] public class FileSystemTreeNodeResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a single with a nested structure. /// @@ -58,5 +55,4 @@ public class FileSystemTreeNodeResponseFixture { return Enumerable.Range(0, count).Select(_ => Create(0, maxDepth, maxChildren)).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/Fixtures/GetDirectoriesQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/Fixtures/GetDirectoriesQueryFixture.cs index 14e9a183..c399815c 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/Fixtures/GetDirectoriesQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/Fixtures/GetDirectoriesQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetDirectoriesQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get directories. /// @@ -28,5 +27,4 @@ public class GetDirectoriesQueryFixture .RuleFor(x => x.Path, f => f.System.DirectoryPath()) .RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs index 3f4f400a..ca959639 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs @@ -27,16 +27,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetDirectoriesQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IDirectoryService _mockDirectoryService; private readonly GetDirectoriesQueryHandler _sut; private readonly DirectoryFixture _directoryFixture; private readonly DirectoryResponseFixture _directoryResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -49,9 +46,7 @@ public class GetDirectoriesQueryHandlerTests _directoryFixture = new DirectoryFixture(); _directoryResponseFixture = new DirectoryResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQueryWithoutFilesIncluded_ShouldReturnSuccessResult() { @@ -139,5 +134,4 @@ public class GetDirectoriesQueryHandlerTests result.Value.Should().BeEmpty(); _mockDirectoryService.Received(1).GetSubdirectories(query.Path, query.IncludeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs index 0bb62d61..d08c495f 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetDirectoriesQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetDirectoriesQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetDirectoriesQueryValidatorTests { _validator = new GetDirectoriesQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -115,5 +110,4 @@ public class GetDirectoriesQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/Fixtures/GetDirectoryTreeQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/Fixtures/GetDirectoryTreeQueryFixture.cs index 02094b22..02e6b1d6 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/Fixtures/GetDirectoryTreeQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/Fixtures/GetDirectoryTreeQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetDirectoryTreeQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get directory tree. /// @@ -31,5 +30,4 @@ public class GetDirectoryTreeQueryFixture .RuleFor(x => x.IncludeFiles, f => includeFiles) .RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandlerTests.cs index 4d43f598..f320c869 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryHandlerTests.cs @@ -29,7 +29,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetDirectoryTreeQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IDriveService _mockDriveService; private readonly IDirectoryService _mockDirectoryService; @@ -40,9 +39,7 @@ public class GetDirectoryTreeQueryHandlerTests private readonly DirectoryFixture _directoryFixture; private readonly PathSegmentFixture _pathSegmentFixture; private readonly FileFixture _fileFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -59,9 +56,7 @@ public class GetDirectoryTreeQueryHandlerTests _pathSegmentFixture = new PathSegmentFixture(); _fileFixture = new FileFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQueryAndNoIncludeFiles_ShouldReturnSuccessResult() { @@ -391,5 +386,4 @@ public class GetDirectoryTreeQueryHandlerTests result.Value.First().Children.Should().HaveCount(2); _mockDirectoryService.Received(1).GetSubdirectories(Arg.Any(), false); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryValidatorTests.cs index aa9e83d8..10bc83e1 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetDirectoryTree/GetDirectoryTreeQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetDirectoryTreeQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetDirectoryTreeQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetDirectoryTreeQueryValidatorTests { _validator = new GetDirectoryTreeQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -143,5 +138,4 @@ public class GetDirectoryTreeQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.IncludeFiles); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/Fixtures/GetTreeDirectoriesQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/Fixtures/GetTreeDirectoriesQueryFixture.cs index 433e1b4a..dc54622e 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/Fixtures/GetTreeDirectoriesQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/Fixtures/GetTreeDirectoriesQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetTreeDirectoriesQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get tree directories. /// @@ -28,5 +27,4 @@ public class GetTreeDirectoriesQueryFixture .RuleFor(x => x.Path, f => f.System.DirectoryPath()) .RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandlerTests.cs index 3384b0d7..23e0c60b 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryHandlerTests.cs @@ -32,7 +32,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetTreeDirectoriesQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IDirectoryService _mockDirectoryService; @@ -40,9 +39,7 @@ public class GetTreeDirectoriesQueryHandlerTests private readonly GetTreeDirectoriesQueryFixture _getTreeDirectoriesQueryFixture; private readonly DirectoryFixture _directoryFixture; private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -56,9 +53,7 @@ public class GetTreeDirectoriesQueryHandlerTests _directoryFixture = new DirectoryFixture(); _fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQueryWithoutFilesIncluded_ShouldReturnSuccessResult() { @@ -170,5 +165,4 @@ public class GetTreeDirectoriesQueryHandlerTests result.Value.Should().BeEquivalentTo(nestedResponses, options => options.IncludingNestedObjects()); result.Value.Any(r => r.Children.Count != 0).Should().BeTrue(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidatorTests.cs index ddd10a1d..805bc0a7 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Directories/Queries/GetTreeDirectories/GetTreeDirectoriesQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G [ExcludeFromCodeCoverage] public class GetTreeDirectoriesQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetTreeDirectoriesQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetTreeDirectoriesQueryValidatorTests { _validator = new GetTreeDirectoriesQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -115,5 +110,4 @@ public class GetTreeDirectoriesQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/Fixtures/GetDrivesQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/Fixtures/GetDrivesQueryFixture.cs index eb3e95cc..321644bf 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/Fixtures/GetDrivesQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/Fixtures/GetDrivesQueryFixture.cs @@ -15,11 +15,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Drives.Queries.GetDri [ExcludeFromCodeCoverage] public class GetDrivesQueryFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a single with a nested structure. /// @@ -58,5 +55,4 @@ public class GetDrivesQueryFixture { return Enumerable.Range(0, count).Select(_ => Create(0, maxDepth, maxChildren)).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs index 59e16f64..b741946f 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs @@ -26,15 +26,12 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Drives.Queries.GetDri [ExcludeFromCodeCoverage] public class GetDrivesQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IDriveService _mockDriveService; private readonly GetDrivesQueryHandler _sut; private readonly GetDrivesQueryFixture _getDrivesQueryFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -46,9 +43,7 @@ public class GetDrivesQueryHandlerTests _sut = new GetDrivesQueryHandler(_mockDriveService, _mockMapper); _getDrivesQueryFixture = new GetDrivesQueryFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalled_ShouldReturnSuccessResult() { @@ -119,5 +114,4 @@ public class GetDrivesQueryHandlerTests _mockDriveService.Received(1).GetDrives(); _mockMapper.Received(1).Map>(Arg.Any>()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs index 55193fc9..40d13ad3 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs @@ -21,14 +21,11 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.FileSystem.Queries.Ge [ExcludeFromCodeCoverage] public class GetFileSystemQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IPlatformContextManager _mockPlatformContextManager; private readonly IPlatformContext _mockPlatformContext; private readonly GetFileSystemQueryHandler _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -40,9 +37,7 @@ public class GetFileSystemQueryHandlerTests _mockPlatformContextManager.GetCurrentContext().Returns(_mockPlatformContext); _sut = new GetFileSystemQueryHandler(_mockPlatformContextManager); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Theory] [InlineData(PlatformType.Unix)] [InlineData(PlatformType.Windows)] @@ -110,5 +105,4 @@ public class GetFileSystemQueryHandlerTests await act.Should().NotThrowAsync(); _mockPlatformContextManager.Received(1).GetCurrentContext(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileFixture.cs index 8ee7080d..f281f67a 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileFixture.cs @@ -18,11 +18,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Fixtures; [ExcludeFromCodeCoverage] public class FileFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class FileFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -84,5 +79,4 @@ public class FileFixture FileSystemItemStatus.Accessible ).Value; } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileResponseFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileResponseFixture.cs index 5034c39d..9743f5f3 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileResponseFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Fixtures/FileResponseFixture.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Fixtures; [ExcludeFromCodeCoverage] public class FileResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -43,5 +40,4 @@ public class FileResponseFixture { return Enumerable.Range(0, count).Select(_ => Create()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/Fixtures/GetFilesQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/Fixtures/GetFilesQueryFixture.cs index da53734d..754f5ca2 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/Fixtures/GetFilesQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/Fixtures/GetFilesQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetFile [ExcludeFromCodeCoverage] public class GetFilesQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get files. /// @@ -28,5 +27,4 @@ public class GetFilesQueryFixture .RuleFor(x => x.Path, f => f.System.FilePath()) .RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs index 7173015d..0f191856 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs @@ -28,16 +28,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetFile [ExcludeFromCodeCoverage] public class GetFilesQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IFileService _mockFileService; private readonly GetFilesQueryHandler _sut; private readonly FileFixture _fileFixture; private readonly FileResponseFixture _fileResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -50,9 +47,7 @@ public class GetFilesQueryHandlerTests _fileFixture = new FileFixture(); _fileResponseFixture = new FileResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQueryWithoutHiddenFiles_ShouldReturnSuccessResult() { @@ -145,5 +140,4 @@ public class GetFilesQueryHandlerTests _mockFileService.Received(1).GetFiles(query.Path, query.IncludeHiddenElements); _mockMapper.Received(1).Map>(Arg.Is>(f => !f.Any())); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs index 824d1034..22e7bebb 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetFile [ExcludeFromCodeCoverage] public class GetFilesQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetFilesQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetFilesQueryValidatorTests { _validator = new GetFilesQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -115,5 +110,4 @@ public class GetFilesQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/Fixtures/GetTreeFilesQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/Fixtures/GetTreeFilesQueryFixture.cs index 07d9d818..f069cc5b 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/Fixtures/GetTreeFilesQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/Fixtures/GetTreeFilesQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetTree [ExcludeFromCodeCoverage] public class GetTreeFilesQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get files. /// @@ -28,5 +27,4 @@ public class GetTreeFilesQueryFixture .RuleFor(x => x.Path, f => f.System.FilePath()) .RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs index d0880e7f..349c0da8 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs @@ -27,16 +27,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetTree [ExcludeFromCodeCoverage] public class GetTreeFilesQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IFileService _mockFileService; private readonly GetTreeFilesQueryHandler _sut; private readonly FileFixture _fileFixture; private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -49,9 +46,7 @@ public class GetTreeFilesQueryHandlerTests _fileFixture = new FileFixture(); _fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQueryWithoutHiddenFiles_ShouldReturnSuccessResult() { @@ -139,5 +134,4 @@ public class GetTreeFilesQueryHandlerTests result.Value.Should().BeEmpty(); _mockFileService.Received(1).GetFiles(query.Path, query.IncludeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs index 73722b8e..af531af1 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetTree [ExcludeFromCodeCoverage] public class GetTreeFilesQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetTreeFilesQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetTreeFilesQueryValidatorTests { _validator = new GetTreeFilesQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -115,5 +110,4 @@ public class GetTreeFilesQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandHandlerTests.cs index 1a5d8ef7..6ce39db9 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandHandlerTests.cs @@ -21,13 +21,10 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.Combine [ExcludeFromCodeCoverage] public class CombinePathCommandHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IPathService _mockPathService; private readonly CombinePathCommandHandler _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -37,9 +34,7 @@ public class CombinePathCommandHandlerTests _mockPathService = Substitute.For(); _sut = new CombinePathCommandHandler(_mockPathService); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidCommand_ShouldReturnSuccessResult() { @@ -95,5 +90,4 @@ public class CombinePathCommandHandlerTests result.Value.Path.Should().BeEmpty(); _mockPathService.Received(1).CombinePath(command.OriginalPath, command.NewPath); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandValidatorTests.cs index 582bb39d..9855fa10 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/CombinePathCommandValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.Combine [ExcludeFromCodeCoverage] public class CombinePathCommandValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly CombinePathCommandValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class CombinePathCommandValidatorTests { _validator = new CombinePathCommandValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenOriginalPathIsNull_ShouldHaveValidationError() { @@ -133,5 +128,4 @@ public class CombinePathCommandValidatorTests result.ShouldNotHaveValidationErrorFor(x => x.OriginalPath); result.ShouldNotHaveValidationErrorFor(x => x.NewPath); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/Fixtures/CombinePathCommandFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/Fixtures/CombinePathCommandFixture.cs index 45908d7e..3a5bb917 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/Fixtures/CombinePathCommandFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/CombinePath/Fixtures/CombinePathCommandFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.Combine [ExcludeFromCodeCoverage] public class CombinePathCommandFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid command to combine paths. /// @@ -27,5 +26,4 @@ public class CombinePathCommandFixture .RuleFor(x => x.OriginalPath, f => f.System.FilePath()) .RuleFor(x => x.NewPath, f => f.System.FilePath()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/Fixtures/SplitPathCommandFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/Fixtures/SplitPathCommandFixture.cs index f1167bfa..e20d8d26 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/Fixtures/SplitPathCommandFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/Fixtures/SplitPathCommandFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.SplitPa [ExcludeFromCodeCoverage] public class SplitPathCommandFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid command for splitting paths. /// @@ -25,5 +24,4 @@ public class SplitPathCommandFixture )) .RuleFor(x => x.Path, f => f.System.FilePath()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandHandlerTests.cs index fd3984a2..4b4cc870 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandHandlerTests.cs @@ -29,7 +29,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.SplitPa [ExcludeFromCodeCoverage] public class SplitPathCommandHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IPathService _mockPathService; @@ -38,9 +37,7 @@ public class SplitPathCommandHandlerTests private readonly PathSegmentResponseFixture _pathSegmentResponseFixture; private readonly PathSegmentMappingConfig _pathSegmentMappingConfig; private readonly TypeAdapterConfig _config; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -57,9 +54,7 @@ public class SplitPathCommandHandlerTests _pathSegmentMappingConfig = new PathSegmentMappingConfig(); _pathSegmentMappingConfig.Register(_config); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidCommand_ShouldReturnSuccessResult() { @@ -126,5 +121,4 @@ public class SplitPathCommandHandlerTests _mockPathService.Received(1).ParsePath(command.Path); _mockMapper.Received(1).Map>(Arg.Any>()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandValidatorTests.cs index 572c1c02..52853e6a 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Commands/SplitPath/SplitPathCommandValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.SplitPa [ExcludeFromCodeCoverage] public class SplitPathCommandValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly SplitPathCommandValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class SplitPathCommandValidatorTests { _validator = new SplitPathCommandValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -87,5 +82,4 @@ public class SplitPathCommandValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.Path); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentFixture.cs index f587fa12..00cb640b 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentFixture.cs @@ -16,11 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Fixtures; [ExcludeFromCodeCoverage] public class PathSegmentFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -28,9 +25,7 @@ public class PathSegmentFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -60,5 +55,4 @@ public class PathSegmentFixture { return Enumerable.Range(0, count).Select(_ => CreatePathSegment()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentResponseFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentResponseFixture.cs index a2fe2461..76b51de5 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentResponseFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSegmentResponseFixture.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Fixtures; [ExcludeFromCodeCoverage] public class PathSegmentResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -37,5 +34,4 @@ public class PathSegmentResponseFixture { return Enumerable.Range(0, count).Select(_ => Create()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSeparatorResponseFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSeparatorResponseFixture.cs index 487e8727..806a6237 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSeparatorResponseFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Fixtures/PathSeparatorResponseFixture.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Fixtures; [ExcludeFromCodeCoverage] public class PathSeparatorResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -37,5 +34,4 @@ public class PathSeparatorResponseFixture { return Enumerable.Range(0, count).Select(_ => Create()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs index 87941d3b..79c47409 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.CheckPat [ExcludeFromCodeCoverage] public class CheckPathExistsQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _mockPathService; private readonly CheckPathExistsQueryHandler _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ public class CheckPathExistsQueryHandlerTests _mockPathService = Substitute.For(); _sut = new CheckPathExistsQueryHandler(_mockPathService); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenPathExistsAndIsNotHidden_ShouldReturnTrueResponse() { @@ -125,5 +120,4 @@ public class CheckPathExistsQueryHandlerTests result.Exists.Should().BeTrue(); _mockPathService.Received(1).Exists(query.Path); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs index 30f114a0..9eb7ea10 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.CheckPat [ExcludeFromCodeCoverage] public class CheckPathExistsQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly CheckPathExistsQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class CheckPathExistsQueryValidatorTests { _validator = new CheckPathExistsQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -87,5 +82,4 @@ public class CheckPathExistsQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.Path); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/Fixtures/CheckPathExistsQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/Fixtures/CheckPathExistsQueryFixture.cs index c8b03454..645b84d3 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/Fixtures/CheckPathExistsQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/CheckPathExists/Fixtures/CheckPathExistsQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.CheckPat [ExcludeFromCodeCoverage] public class CheckPathExistsQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to check if paths exist. /// @@ -28,5 +27,4 @@ public class CheckPathExistsQueryFixture .RuleFor(x => x.Path, f => f.System.FilePath()) .RuleFor(x => x.IncludeHiddenElements, includeHiddenElements); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/Fixtures/GetPathParentQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/Fixtures/GetPathParentQueryFixture.cs index 11cd45a3..63ea1131 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/Fixtures/GetPathParentQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/Fixtures/GetPathParentQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathP [ExcludeFromCodeCoverage] public class GetPathParentQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to check if paths exist. /// @@ -25,5 +24,4 @@ public class GetPathParentQueryFixture )) .RuleFor(x => x.Path, f => f.System.FilePath()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs index 92ec3a77..fe5c43bc 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs @@ -26,16 +26,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathP [ExcludeFromCodeCoverage] public class GetPathParentQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IPathService _mockPathService; private readonly GetPathParentQueryHandler _sut; private readonly PathSegmentFixture _pathSegmentFixture; private readonly PathSegmentResponseFixture _pathSegmentResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== public GetPathParentQueryHandlerTests() { _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); @@ -45,9 +42,7 @@ public class GetPathParentQueryHandlerTests _pathSegmentFixture = new PathSegmentFixture(); _pathSegmentResponseFixture = new PathSegmentResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQuery_ShouldReturnSuccessResult() { @@ -114,5 +109,4 @@ public class GetPathParentQueryHandlerTests _mockPathService.Received(1).GoUpOneLevel(query.Path); _mockMapper.Received(1).Map>(Arg.Is>(p => !p.Any())); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs index c0f56971..a65398b2 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathP [ExcludeFromCodeCoverage] public class GetPathParentQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetPathParentQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetPathParentQueryValidatorTests { _validator = new GetPathParentQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -87,5 +82,4 @@ public class GetPathParentQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.Path); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/Fixtures/GetPathRootQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/Fixtures/GetPathRootQueryFixture.cs index 8e8a2e01..5aaa6714 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/Fixtures/GetPathRootQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/Fixtures/GetPathRootQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathR [ExcludeFromCodeCoverage] public class GetPathRootQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to check if paths exist. /// @@ -25,5 +24,4 @@ public class GetPathRootQueryFixture )) .RuleFor(x => x.Path, f => f.System.FilePath()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs index d25e8358..17473562 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs @@ -24,16 +24,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathR [ExcludeFromCodeCoverage] public class GetPathRootQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IMapper _mockMapper; private readonly IPathService _mockPathService; private readonly GetPathRootQueryHandler _sut; private readonly PathSegmentFixture _pathSegmentFixture; private readonly PathSegmentResponseFixture _pathSegmentResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -46,9 +43,7 @@ public class GetPathRootQueryHandlerTests _pathSegmentFixture = new PathSegmentFixture(); _pathSegmentResponseFixture = new PathSegmentResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQuery_ShouldReturnSuccessResult() { @@ -115,5 +110,4 @@ public class GetPathRootQueryHandlerTests _mockPathService.Received(1).GetPathRoot(query.Path); _mockMapper.Received(1).Map(Arg.Is(p => p == rootPathSegment)); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs index 59c3fc43..1ceea673 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathR [ExcludeFromCodeCoverage] public class GetPathRootQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetPathRootQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class GetPathRootQueryValidatorTests { _validator = new GetPathRootQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -87,5 +82,4 @@ public class GetPathRootQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.Path); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathSeparator/GetPathSeparatorQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathSeparator/GetPathSeparatorQueryHandlerTests.cs index e0fc358e..34e86458 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathSeparator/GetPathSeparatorQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/GetPathSeparator/GetPathSeparatorQueryHandlerTests.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathS [ExcludeFromCodeCoverage] public class GetPathSeparatorQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _mockPathService; private readonly GetPathSeparatorQueryHandler _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ public class GetPathSeparatorQueryHandlerTests _mockPathService = Substitute.For(); _sut = new GetPathSeparatorQueryHandler(_mockPathService); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalled_ShouldReturnPathSeparatorResponse() { @@ -101,5 +96,4 @@ public class GetPathSeparatorQueryHandlerTests // Assert await act.Should().NotThrowAsync(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/Fixtures/ValidatePathQueryFixure.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/Fixtures/ValidatePathQueryFixure.cs index 18cca19b..e7ecd5f3 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/Fixtures/ValidatePathQueryFixure.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/Fixtures/ValidatePathQueryFixure.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.Validate [ExcludeFromCodeCoverage] public class ValidatePathQueryFixure { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to check if paths exist. /// @@ -25,5 +24,4 @@ public class ValidatePathQueryFixure )) .RuleFor(x => x.Path, f => f.System.FilePath()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs index c16d8ee8..f43c085a 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.Validate [ExcludeFromCodeCoverage] public class ValidatePathQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPathService _mockPathService; private readonly ValidatePathQueryHandler _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ public class ValidatePathQueryHandlerTests _mockPathService = Substitute.For(); _sut = new ValidatePathQueryHandler(_mockPathService); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidPath_ShouldReturnTrueResponse() { @@ -94,5 +89,4 @@ public class ValidatePathQueryHandlerTests result.IsValid.Should().BeFalse(); _mockPathService.Received(1).IsValidPath(Arg.Any()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs index 5dc5b812..710b061b 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Pahs/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs @@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.Validate [ExcludeFromCodeCoverage] public class ValidatePathQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ValidatePathQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class ValidatePathQueryValidatorTests { _validator = new ValidatePathQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -87,5 +82,4 @@ public class ValidatePathQueryValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.Path); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Fixtures/ThumbnailResponseFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Fixtures/ThumbnailResponseFixture.cs index 79113cd6..f82b0d76 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Fixtures/ThumbnailResponseFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Fixtures/ThumbnailResponseFixture.cs @@ -13,7 +13,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Fixtures; [ExcludeFromCodeCoverage] public class ThumbnailResponseFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get a thumbnail. /// @@ -28,5 +27,4 @@ public class ThumbnailResponseFixture .RuleFor(x => x.Type, f => f.PickRandom()) .RuleFor(x => x.Bytes, f => f.Random.Bytes(20)); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/Fixtures/GetThumbnailQueryFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/Fixtures/GetThumbnailQueryFixture.cs index 2ad00692..eb25fd9a 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/Fixtures/GetThumbnailQueryFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/Fixtures/GetThumbnailQueryFixture.cs @@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Queries.Ge [ExcludeFromCodeCoverage] public class GetThumbnailQueryFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get a thumbnail. /// @@ -27,5 +26,4 @@ public class GetThumbnailQueryFixture .RuleFor(x => x.Path, f => f.System.FilePath()) .RuleFor(x => x.Quality, f => f.Random.Int()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs index ef6c04cd..4e9a1637 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs @@ -23,14 +23,11 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Queries.Ge [ExcludeFromCodeCoverage] public class GetThumbnailQueryHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IThumbnailService _mockThumbnailService; private readonly IMapper _mockMapper; private readonly GetThumbnailQueryHandler _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== public GetThumbnailQueryHandlerTests() { _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); @@ -38,9 +35,7 @@ public class GetThumbnailQueryHandlerTests _mockMapper = Substitute.For(); _sut = new GetThumbnailQueryHandler(_mockThumbnailService, _mockMapper); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidQuery_ShouldReturnSuccessResult() { @@ -100,5 +95,4 @@ public class GetThumbnailQueryHandlerTests await _mockThumbnailService.Received(1).GetThumbnailAsync(query.Path, query.Quality, cts.Token); _mockMapper.DidNotReceive().Map(Arg.Any()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs index 7e52fe8b..9c3c0780 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs @@ -13,11 +13,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Queries.Ge [ExcludeFromCodeCoverage] public class GetThumbnailQueryValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly GetThumbnailQueryValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -25,9 +22,7 @@ public class GetThumbnailQueryValidatorTests { _validator = new GetThumbnailQueryValidator(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenPathIsNull_ShouldHaveValidationError() { @@ -106,5 +101,4 @@ public class GetThumbnailQueryValidatorTests result.ShouldNotHaveValidationErrorFor(x => x.Quality); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs index 681f60fc..1b31b0e5 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs @@ -29,16 +29,13 @@ namespace Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.B [ExcludeFromCodeCoverage] public class AddBookCommandHandlerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IUnitOfWork _mockUnitOfWork; private readonly IMapper _mockMapper; private readonly IBookRepository _mockBookRepository; private readonly AddBookCommandHandler _sut; private readonly AddBookCommandFixture _commandBookFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -57,9 +54,7 @@ public class AddBookCommandHandlerTests _sut = new AddBookCommandHandler(_mockUnitOfWork, _mockMapper); _commandBookFixture = new AddBookCommandFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task Handle_WhenCalledWithValidCommand_ShouldReturnSuccessResult() { @@ -274,5 +269,4 @@ public class AddBookCommandHandlerTests await _mockBookRepository.DidNotReceive().InsertAsync(Arg.Any(), Arg.Any()); await _mockUnitOfWork.DidNotReceive().SaveChangesAsync(Arg.Any()); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs index c3c53341..f7636d20 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs @@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.B [ExcludeFromCodeCoverage] public class AddBookCommandValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly AddBookCommandFixture _commandBookFixture; private readonly AddBookCommandValidator _validator; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -32,9 +29,7 @@ public class AddBookCommandValidatorTests _validator = new AddBookCommandValidator(); _commandBookFixture = new AddBookCommandFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenTitleIsNull_ShouldHaveValidationError() { @@ -1893,5 +1888,4 @@ public class AddBookCommandValidatorTests // Assert result.ShouldNotHaveValidationErrorFor(x => x.Ratings[0].VoteCount); } - #endregion } diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/Fixtures/AddBookCommandFixture.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/Fixtures/AddBookCommandFixture.cs index bb5c4299..31b46d05 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/Fixtures/AddBookCommandFixture.cs +++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/Fixtures/AddBookCommandFixture.cs @@ -22,13 +22,10 @@ namespace Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.B [ExcludeFromCodeCoverage] public class AddBookCommandFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Fixture _fixture; private readonly Random _random = new(); private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -39,9 +36,7 @@ public class AddBookCommandFixture _fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder()); _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid command to add a book. /// @@ -343,5 +338,4 @@ public class AddBookCommandFixture { return input?.Length > maxLength ? input[..maxLength] : input; } - #endregion } diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/DependencyInjection/DataAccessLayerServicesTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/DependencyInjection/DataAccessLayerServicesTests.cs index 26d5e158..dfd92280 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/DependencyInjection/DataAccessLayerServicesTests.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/DependencyInjection/DataAccessLayerServicesTests.cs @@ -23,11 +23,8 @@ namespace Lumina.DataAccess.UnitTests.Common.DependencyInjection; [ExcludeFromCodeCoverage] public class DataAccessLayerServicesTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +32,7 @@ public class DataAccessLayerServicesTests { _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void AddDataAccessLayerServices_WhenBasePathExists_ShouldAddServices() { @@ -88,5 +83,4 @@ public class DataAccessLayerServicesTests IBookRepository? repository = serviceProvider.GetService(); repository.Should().NotBeNull(); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/BogusExtensions.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/BogusExtensions.cs index 2812f195..7f969784 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/BogusExtensions.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/BogusExtensions.cs @@ -12,7 +12,6 @@ namespace Lumina.DataAccess.UnitTests.Common.Setup; [ExcludeFromCodeCoverage] public static class BogusExtensions { - #region ===================================================================== METHODS =================================================================================== /// /// Adds random data generation support to the class. /// @@ -36,5 +35,4 @@ public static class BogusExtensions DateTime endDateTime = end.ToDateTime(TimeOnly.MinValue); return System.DateOnly.FromDateTime(faker.Date.Between(startDateTime, endDateTime)); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs index 7295612e..c2383b0c 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/DateOnlySpecimenBuilder.cs @@ -12,7 +12,6 @@ namespace Lumina.DataAccess.UnitTests.Common.Setup; [ExcludeFromCodeCoverage] public class DateOnlySpecimenBuilder : ISpecimenBuilder { - #region ===================================================================== METHODS =================================================================================== /// /// Adds support to the AutoFixture library. /// @@ -25,5 +24,4 @@ public class DateOnlySpecimenBuilder : ISpecimenBuilder return DateOnly.FromDateTime(DateTime.Now); return new NoSpecimen(); } - #endregion } diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs index bd0813c5..5b8dd9c8 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Common/Setup/NullableDateOnlySpecimenBuilder.cs @@ -12,7 +12,6 @@ namespace Lumina.DataAccess.UnitTests.Common.Setup; [ExcludeFromCodeCoverage] public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder { - #region ===================================================================== METHODS =================================================================================== /// /// Adds support to the AutoFixture library. /// @@ -25,5 +24,4 @@ public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder return (DateOnly?)DateOnly.FromDateTime(DateTime.Now); return new NoSpecimen(); } - #endregion } diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs index 9fcd67fc..a3d1604d 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs @@ -26,13 +26,10 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Books; [ExcludeFromCodeCoverage] public class BookRepositoryTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly LuminaDbContext _mockContext; private readonly BookRepository _sut; private readonly BookModelFixture _bookModelFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -42,9 +39,7 @@ public class BookRepositoryTests _sut = new BookRepository(_mockContext); _bookModelFixture = new BookModelFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task InsertAsync_WhenBookDoesNotExist_ShouldAddBookToContextAndReturnCreated() { @@ -194,5 +189,4 @@ public class BookRepositoryTests retrievedBook.Genres.Should().HaveCount(2); retrievedBook.ISBNs.Should().HaveCount(2); } - #endregion } diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/Fixtures/BookModelFixture.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/Fixtures/BookModelFixture.cs index f95c404e..59d653c6 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/Fixtures/BookModelFixture.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/Fixtures/BookModelFixture.cs @@ -19,13 +19,10 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Books.Fixtures; [ExcludeFromCodeCoverage] public class BookModelFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Fixture _fixture; private readonly Random _random = new(); private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -37,9 +34,7 @@ public class BookModelFixture _faker = new Faker(); ConfigureCustomTypes(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid BookModel. /// @@ -204,5 +199,4 @@ public class BookModelFixture _fixture.Create() )); } - #endregion } diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryDictionaryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryDictionaryTests.cs index cf3cdaca..4bb64cb8 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryDictionaryTests.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryDictionaryTests.cs @@ -17,11 +17,8 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Common.Factory; [ExcludeFromCodeCoverage] public class RepositoryDictionaryTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class RepositoryDictionaryTests { _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Add_WhenValidRepositoryItemIsAdded_ShouldIncreaseCount() { @@ -111,5 +106,4 @@ public class RepositoryDictionaryTests Action act = () => repositoryDictionary.Add(nonRepository); act.Should().Throw().WithMessage("Value must implement IRepository interface!"); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs index 02bdb024..1ba4c7fa 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs @@ -16,7 +16,6 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Common.Factory; [ExcludeFromCodeCoverage] public class RepositoryFactoryTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void CreateRepository_WhenCalled_ShouldReturnCorrectRepository() { @@ -47,7 +46,6 @@ public class RepositoryFactoryTests Action act = () => repositoryFactory.CreateRepository(); act.Should().Throw().WithMessage("No service for type 'Lumina.DataAccess.UnitTests.Core.Repositories.Common.Factory.IUnregisteredRepository' has been registered."); } - #endregion } public interface IUnregisteredRepository { } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/UoW/UnitOfWorkTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/UoW/UnitOfWorkTests.cs index e00bcb83..e143a871 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/UoW/UnitOfWorkTests.cs +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/UoW/UnitOfWorkTests.cs @@ -24,11 +24,8 @@ namespace Lumina.DataAccess.UnitTests.Core.UoW; [ExcludeFromCodeCoverage] public class UnitOfWorkTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -43,9 +40,7 @@ public class UnitOfWorkTests return Substitute.ForPartsOf(options); })); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void ResetRepositories_WhenCalled_ShouldClearAllRepositories() { @@ -140,5 +135,4 @@ public class UnitOfWorkTests // Assert await dbContext.Received(1).SaveChangesAsync(cancellationToken); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Common/Primitives/OptionalTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Common/Primitives/OptionalTests.cs index 5309bbe0..f918f36a 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Common/Primitives/OptionalTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Common/Primitives/OptionalTests.cs @@ -12,7 +12,6 @@ namespace Lumina.Domain.UnitTests.Common.Primitives; [ExcludeFromCodeCoverage] public class OptionalTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void Some_WhenCreatingOptionalWithValue_ShouldHaveValueAndCorrectValue() { @@ -133,5 +132,4 @@ public class OptionalTests // Assert result.Should().BeEmpty(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/DirectoryTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/DirectoryTests.cs index ba523c32..6c4a7959 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/DirectoryTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/DirectoryTests.cs @@ -20,7 +20,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti [ExcludeFromCodeCoverage] public class DirectoryTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void Create_WhenCalledWithValidParameters_ShouldReturnSuccessfulResult() { @@ -134,5 +133,4 @@ public class DirectoryTests result.IsError.Should().BeFalse(); directory.Items.Should().NotContain(item); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/FileTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/FileTests.cs index 718ff751..7b0a2597 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/FileTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/FileTests.cs @@ -18,7 +18,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti [ExcludeFromCodeCoverage] public class FileTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void Create_WhenCalledWithValidParameters_ShouldReturnSuccessfulResult() { @@ -154,5 +153,4 @@ public class FileTests result.FirstError.Should().Be(Errors.FileManagement.NameCannotBeEmpty); file.Name.Should().Be("file.txt"); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/DirectoryFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/DirectoryFixture.cs index ca7b480e..cb9cf9d5 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/DirectoryFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/DirectoryFixture.cs @@ -19,11 +19,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti [ExcludeFromCodeCoverage] public class DirectoryFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +28,7 @@ public class DirectoryFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -112,5 +107,4 @@ public class DirectoryFixture } return CreateDirectory(childItems: childItems); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/FileFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/FileFixture.cs index 294baebb..361e9fef 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/FileFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/FileFixture.cs @@ -18,11 +18,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti [ExcludeFromCodeCoverage] public class FileFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class FileFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -84,5 +79,4 @@ public class FileFixture FileSystemItemStatus.Accessible ).Value; } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/UnixRootItemFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/UnixRootItemFixture.cs index 7ae9bf5f..02e4e5b1 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/UnixRootItemFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/Fixtures/UnixRootItemFixture.cs @@ -15,7 +15,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti [ExcludeFromCodeCoverage] public class UnixRootItemFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -29,5 +28,4 @@ public class UnixRootItemFixture throw new InvalidOperationException("Failed to create UnixRootItem: " + string.Join(", ", unixRootItemResult.Errors)); return unixRootItemResult.Value; } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/UnixRootItemTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/UnixRootItemTests.cs index 4c30e575..6673132d 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/UnixRootItemTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/UnixRootItemTests.cs @@ -17,7 +17,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti [ExcludeFromCodeCoverage] public class UnixRootItemTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void Create_WhenCalledWithDefaultStatus_ShouldReturnSuccessfulResult() { @@ -102,5 +101,4 @@ public class UnixRootItemTests result.FirstError.Should().Be(Errors.FileManagement.ParentNodeCannotBeNull); unixRootItem.Parent.HasValue.Should().BeFalse(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/WindowsRootItemTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/WindowsRootItemTests.cs index f1df9c47..ba5c708e 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/WindowsRootItemTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Entities/WindowsRootItemTests.cs @@ -18,7 +18,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti [ExcludeFromCodeCoverage] public class WindowsRootItemTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void Create_WhenCalledWithValidParameters_ShouldReturnSuccessfulResult() { @@ -144,5 +143,4 @@ public class WindowsRootItemTests result.FirstError.Should().Be(Errors.FileManagement.ParentNodeCannotBeNull); windowsRootItem.Parent.HasValue.Should().BeFalse(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/FileSystemItemTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/FileSystemItemTests.cs index 36fbcd86..d833b891 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/FileSystemItemTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/FileSystemItemTests.cs @@ -22,12 +22,9 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate; [ExcludeFromCodeCoverage] public class FileSystemItemTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly FileSystemPathIdFixture _fileSystemPathIdFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -36,9 +33,7 @@ public class FileSystemItemTests _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); _fileSystemPathIdFixture = new FileSystemPathIdFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Constructor_WhenCalled_ShouldSetPropertiesCorrectly() { @@ -172,5 +167,4 @@ public class FileSystemItemTests FileSystemItemType type = _fixture.Create(); return new FileSystemItemFixture(id, name, type); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Fixtures/FileSystemItemFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Fixtures/FileSystemItemFixture.cs index b95b8e79..7d30ac75 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Fixtures/FileSystemItemFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Fixtures/FileSystemItemFixture.cs @@ -13,7 +13,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Fixtur [ExcludeFromCodeCoverage] public class FileSystemItemFixture : FileSystemItem { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -24,5 +23,4 @@ public class FileSystemItemFixture : FileSystemItem : base(id, name, fileSystemItemType) { } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryProviderServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryProviderServiceTests.cs index 4bc2d0a2..cdd02283 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryProviderServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryProviderServiceTests.cs @@ -30,7 +30,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class DirectoryProviderServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IFileSystem _mockFileSystem; private readonly IFileSystemPermissionsService _mockFileSystemPermissionsService; @@ -59,9 +58,7 @@ public class DirectoryProviderServiceTests private readonly string _pathValid2 = s_isLinux ? "/Valid/" : @"C:\Valid\"; private readonly string _pathInvalid2 = s_isLinux ? "/Invalid/" : @"C:\Invalid\"; private readonly char _dirSeparator = s_isLinux ? '/' : '\\'; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -73,9 +70,7 @@ public class DirectoryProviderServiceTests _sut = new DirectoryProviderService(_mockFileSystem, _mockFileSystemPermissionsService); _fileSystemPathIdFixture = new(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void GetSubdirectoryPaths_WhenUserHasNoAccess_ShouldReturnUnauthorizedAccessError() { @@ -1008,5 +1003,4 @@ public class DirectoryProviderServiceTests result.FirstError.Should().Be(Errors.Permission.UnauthorizedAccess); _mockFileSystem.DirectoryInfo.DidNotReceive().New(Arg.Any()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryServiceTests.cs index d0559ce3..9236132f 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DirectoryServiceTests.cs @@ -28,7 +28,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class DirectoryServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IEnvironmentContext _mockEnvironmentContext; private readonly IPlatformContextManager _mockPlatformContextManager; private readonly IPlatformContext _mockPlatformContext; @@ -40,9 +39,7 @@ public class DirectoryServiceTests private readonly string _pathDirTestSubDir1 = s_isLinux ? "/TestDir/Sub1" : @"C:\TestDir\Sub1"; private readonly string _pathDirTestSubDir2 = s_isLinux ? "/TestDir/Sub2" : @"C:\TestDir\Sub2"; private readonly char _dirSeparator = s_isLinux ? '/' : '\\'; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -56,9 +53,7 @@ public class DirectoryServiceTests _fileSystemPathIdFixture = new FileSystemPathIdFixture(); _directoryFixture = new DirectoryFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void GetSubdirectories_WithValidPath_ShouldReturnListOfDirectories() { @@ -786,5 +781,4 @@ public class DirectoryServiceTests result.IsError.Should().BeTrue(); result.FirstError.Should().Be(Errors.FileManagement.DirectoryNotFound); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DriveServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DriveServiceTests.cs index 8067d15c..5615212e 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DriveServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/DriveServiceTests.cs @@ -22,14 +22,11 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class DriveServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _mockFileSystem; private readonly IPlatformContextManager _mockPlatformContextManager; private readonly IPlatformContext _mockPlatformContext; private readonly DriveService _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -41,9 +38,7 @@ public class DriveServiceTests _mockPlatformContextManager.GetCurrentContext().Returns(_mockPlatformContext); _sut = new DriveService(_mockFileSystem, _mockPlatformContextManager); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void GetDrives_OnUnixPlatform_ShouldReturnSingleUnixRootItem() { @@ -90,5 +85,4 @@ public class DriveServiceTests mockDriveInfo.IsReady.Returns(isReady); return mockDriveInfo; } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileProviderServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileProviderServiceTests.cs index 76243a7a..88623896 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileProviderServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileProviderServiceTests.cs @@ -29,7 +29,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class FileProviderServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly IFileSystem _mockFileSystem; private readonly IFileSystemPermissionsService _mockFileSystemPermissionsService; @@ -46,9 +45,7 @@ public class FileProviderServiceTests private readonly string _pathSource = s_isLinux ? "/Source" : @"C:\Source"; private readonly string _pathDestination = s_isLinux ? "/Destination" : @"C:\Destination"; private readonly char _dirSeparator = s_isLinux ? '/' : '\\'; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -60,9 +57,7 @@ public class FileProviderServiceTests _sut = new FileProviderService(_mockFileSystem, _mockFileSystemPermissionsService); _fileSystemPathIdFixture = new(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void GetFilePaths_WhenUserHasNoAccess_ShouldReturnUnauthorizedAccessError() { @@ -931,5 +926,4 @@ public class FileProviderServiceTests result.FirstError.Should().Be(Errors.Permission.UnauthorizedAccess); _mockFileSystem.File.DidNotReceive().Delete(Arg.Any()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileServiceTests.cs index 0e393fa7..62617709 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileServiceTests.cs @@ -28,7 +28,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class FileServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IEnvironmentContext _mockEnvironmentContext; private readonly IPlatformContextManager _mockPlatformContextManager; private readonly IPlatformContext _mockPlatformContext; @@ -49,9 +48,7 @@ public class FileServiceTests private readonly string _pathSourceExistingFile = s_isLinux ? "/Source/existingfile.txt" : @"C:\Source\existingfile.txt"; private readonly string _pathSourceNonExistingFile = s_isLinux ? "/Source/nonexistent.txt" : @"C:\Source\nonexistent.txt"; private readonly char _dirSeparator = s_isLinux ? '/' : '\\'; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -65,9 +62,7 @@ public class FileServiceTests _fileSystemPathIdFixture = new FileSystemPathIdFixture(); _fileFixture = new FileFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void GetFiles_WithValidPath_ShouldReturnListOfFiles() { @@ -1217,5 +1212,4 @@ public class FileServiceTests result.IsError.Should().BeTrue(); result.FirstError.Should().Be(Errors.Permission.UnauthorizedAccess); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileTypeServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileTypeServiceTests.cs index 4e79fed1..694db8c3 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileTypeServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/FileTypeServiceTests.cs @@ -27,15 +27,12 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class FileTypeServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private MockFileSystem _mockFileSystem = null!; private readonly IFileSystemPermissionsService _mockFileSystemPermissionsService; private FileTypeService? sut; private readonly FileSystemPathIdFixture _fileSystemPathIdFixture; private readonly FileFixture _fileFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -45,9 +42,7 @@ public class FileTypeServiceTests _fileSystemPathIdFixture = new FileSystemPathIdFixture(); _fileFixture = new FileFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetImageTypeAsync_WithValidFile_ShouldReturnCorrectImageType() { @@ -233,5 +228,4 @@ public class FileTypeServiceTests result.IsError.Should().BeFalse(); result.Value.Should().Be(expectedType, because: $"the file header matches {testName}"); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/Fixtures/ImageTypeFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/Fixtures/ImageTypeFixture.cs index 0b9d19fe..41a13121 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/Fixtures/ImageTypeFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/Fixtures/ImageTypeFixture.cs @@ -20,7 +20,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic public class ImageTypeFixture : TheoryData { - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +30,7 @@ public class ImageTypeFixture : TheoryData Add(ImageType.BMP, CreateImage(new BmpEncoder())); Add(ImageType.GIF, CreateImage(new GifEncoder())); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a byte array representing a thumbnail fixture. /// @@ -46,5 +43,4 @@ public class ImageTypeFixture : TheoryData image.Save(ms, encoder); return ms.ToArray(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/PathServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/PathServiceTests.cs index 6761f802..a5abbb34 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/PathServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/PathServiceTests.cs @@ -21,16 +21,13 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class PathServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPlatformContextManager _mockPlatformContextManager; private readonly IPlatformContext _mockPlatformContext; private readonly IPathStrategy _mockPathStrategy; private readonly PathService _sut; private readonly FileSystemPathIdFixture _fileSystemPathIdFixture; private readonly PathSegmentFixture _pathSegmentFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -45,9 +42,7 @@ public class PathServiceTests _fileSystemPathIdFixture = new FileSystemPathIdFixture(); _pathSegmentFixture = new PathSegmentFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void IsValidPath_WithValidPath_ShouldReturnTrue() { @@ -528,5 +523,4 @@ public class PathServiceTests result.FirstError.Should().Be(Errors.FileManagement.InvalidPath); _mockPathStrategy.DidNotReceive().GetPathRoot(Arg.Any()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/ThumbnailServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/ThumbnailServiceTests.cs index 37ccc078..6c66a407 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/ThumbnailServiceTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Services/ThumbnailServiceTests.cs @@ -26,13 +26,10 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Servic [ExcludeFromCodeCoverage] public class ThumbnailServiceTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IEnvironmentContext _mockEnvironmentContext; private readonly ThumbnailService _sut; private readonly FileSystemPathIdFixture _fileSystemPathIdFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -42,9 +39,7 @@ public class ThumbnailServiceTests _sut = new ThumbnailService(_mockEnvironmentContext); _fileSystemPathIdFixture = new FileSystemPathIdFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetThumbnailAsync_WithValidPath_ShouldReturnThumbnail() { @@ -191,5 +186,4 @@ public class ThumbnailServiceTests await Assert.ThrowsAsync(() => _sut.GetThumbnailAsync(pathId, quality, cts.Token)); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Environment/EnvironmentContextTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Environment/EnvironmentContextTests.cs index 5f30494c..22002449 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Environment/EnvironmentContextTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Environment/EnvironmentContextTests.cs @@ -14,13 +14,10 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Strate [ExcludeFromCodeCoverage] public class EnvironmentContextTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IDirectoryProviderService _mockDirectoryProviderService; private readonly IFileProviderService _mockFileProviderService; private readonly IFileTypeService _mockFileTypeService; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class EnvironmentContextTests _mockFileProviderService = Substitute.For(); _mockFileTypeService = Substitute.For(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Constructor_WhenCalledWithValidParameters_ShouldInitializeAllProperties() { @@ -95,5 +90,4 @@ public class EnvironmentContextTests // Assert result.Should().Be(_mockDirectoryProviderService); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs index fa2dc152..2e11147e 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs @@ -20,14 +20,11 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Strate [ExcludeFromCodeCoverage] public class UnixPathStrategyTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _mockFileSystem; private readonly UnixPathStrategy _sut; private readonly FileSystemPathIdFixture _fileSystemPathIdFixture; private readonly PathSegmentFixture _pathSegmentFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -38,9 +35,7 @@ public class UnixPathStrategyTests _fileSystemPathIdFixture = new FileSystemPathIdFixture(); _pathSegmentFixture = new PathSegmentFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Theory] [InlineData("/home/user")] [InlineData("/var/log/")] @@ -556,5 +551,4 @@ public class UnixPathStrategyTests result.IsError.Should().BeTrue(); result.FirstError.Should().Be(Errors.FileManagement.InvalidPath); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs index ad1c2a3a..15fb9ee4 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs @@ -20,14 +20,11 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Strate [ExcludeFromCodeCoverage] public class WindowsPathStrategyTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFileSystem _mockFileSystem; private readonly WindowsPathStrategy _sut; private readonly FileSystemPathIdFixture _fileSystemPathIdFixture; private readonly PathSegmentFixture _pathSegmentFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -38,9 +35,7 @@ public class WindowsPathStrategyTests _fileSystemPathIdFixture = new FileSystemPathIdFixture(); _pathSegmentFixture = new PathSegmentFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Theory] [InlineData(@"C:\Users\User")] [InlineData(@"D:\Program Files\")] @@ -772,5 +767,4 @@ public class WindowsPathStrategyTests result.IsError.Should().BeTrue(); result.FirstError.Should().Be(Errors.FileManagement.InvalidPath); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextFactoryTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextFactoryTests.cs index a86d3127..bb6ad999 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextFactoryTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextFactoryTests.cs @@ -17,12 +17,9 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Strate [ExcludeFromCodeCoverage] public class PlatformContextFactoryTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IServiceProvider _serviceProvider; private readonly PlatformContextFactory _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -37,9 +34,7 @@ public class PlatformContextFactoryTests _serviceProvider = services.BuildServiceProvider(); _sut = new PlatformContextFactory(_serviceProvider); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void CreateStrategy_WhenWindowsServiceExists_ShouldReturnWindowsService() { @@ -68,5 +63,4 @@ public class PlatformContextFactoryTests // Act & Assert Assert.Throws(() => _sut.CreateStrategy()); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextManagerTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextManagerTests.cs index d2a690f9..80a69f65 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextManagerTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextManagerTests.cs @@ -16,12 +16,9 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Strate [ExcludeFromCodeCoverage] public class PlatformContextManagerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IPlatformContextFactory _mockPlatformContextFactory; private PlatformContextManager? sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class PlatformContextManagerTests { _mockPlatformContextFactory = Substitute.For(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void GetCurrentContext_WhenNoContextSet_ShouldSetDefaultContext() { @@ -155,5 +150,4 @@ public class PlatformContextManagerTests result.Should().Be(mockWindowsContext); _mockPlatformContextFactory.Received(1).CreateStrategy(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextTests.cs index 3a33c30d..ac2720c7 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/Strategies/Platform/PlatformContextTests.cs @@ -15,7 +15,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Strate [ExcludeFromCodeCoverage] public class PlatformContextTests { - #region ===================================================================== METHODS =================================================================================== [Fact] public void WindowsPlatformContext_Constructor_ShouldSetPropertiesCorrectly() { @@ -117,5 +116,4 @@ public class PlatformContextTests unixPlatformContext.GetType().GetProperty(nameof(UnixPlatformContext.Platform))! .SetMethod.Should().BeNull(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/FileSystemPathIdTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/FileSystemPathIdTests.cs index b6e88812..40460aee 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/FileSystemPathIdTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/FileSystemPathIdTests.cs @@ -15,11 +15,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class FileSystemPathIdTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -27,9 +24,7 @@ public class FileSystemPathIdTests { _fileSystemPathIdFixture = new FileSystemPathIdFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Create_WithValidPath_ShouldReturnFileSystemPathId() { @@ -146,5 +141,4 @@ public class FileSystemPathIdTests // Assert result.Should().BeTrue(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/FileSystemPathIdFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/FileSystemPathIdFixture.cs index 93d87d02..06cdabe8 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/FileSystemPathIdFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/FileSystemPathIdFixture.cs @@ -14,11 +14,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class FileSystemPathIdFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -26,9 +23,7 @@ public class FileSystemPathIdFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -44,5 +39,4 @@ public class FileSystemPathIdFixture throw new InvalidOperationException("Failed to create FileSystemPathId: " + string.Join(", ", fileSystemPathIdResult.Errors)); return fileSystemPathIdResult.Value; } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/PathSegmentFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/PathSegmentFixture.cs index 59173f7e..06c2aed4 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/PathSegmentFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/PathSegmentFixture.cs @@ -16,11 +16,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class PathSegmentFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -28,9 +25,7 @@ public class PathSegmentFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -60,5 +55,4 @@ public class PathSegmentFixture { return Enumerable.Range(0, count).Select(_ => CreatePathSegment()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/StreamInfoFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/StreamInfoFixture.cs index fd677680..0bc3fb71 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/StreamInfoFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/StreamInfoFixture.cs @@ -17,11 +17,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class StreamInfoFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class StreamInfoFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -80,5 +75,4 @@ public class StreamInfoFixture { return Enumerable.Range(0, count).Select(_ => CreateStreamInfo()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/ThumbnailFixture.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/ThumbnailFixture.cs index 13f23d2d..b38dbb87 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/ThumbnailFixture.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/Fixtures/ThumbnailFixture.cs @@ -15,11 +15,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class ThumbnailFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -27,9 +24,7 @@ public class ThumbnailFixture { _faker = new Faker(); } - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -53,5 +48,4 @@ public class ThumbnailFixture { return Enumerable.Range(0, count).Select(_ => CreateThumbnail()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/PathSegmentTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/PathSegmentTests.cs index 159b65d2..e4548c2e 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/PathSegmentTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/PathSegmentTests.cs @@ -15,11 +15,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class PathSegmentTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly PathSegmentFixture _pathSegmentFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -27,9 +24,7 @@ public class PathSegmentTests { _pathSegmentFixture = new PathSegmentFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Create_WithValidInput_ShouldReturnPathSegment() { @@ -147,5 +142,4 @@ public class PathSegmentTests // Assert result.Should().BeTrue(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/StreamInfoTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/StreamInfoTests.cs index 2994d324..78b8ebe0 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/StreamInfoTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/StreamInfoTests.cs @@ -27,11 +27,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class StreamInfoTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly StreamInfoFixture _streamInfoFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -39,9 +36,7 @@ public class StreamInfoTests { _streamInfoFixture = new StreamInfoFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Create_WithValidInput_ShouldReturnStreamInfo() { @@ -182,5 +177,4 @@ public class StreamInfoTests // Assert hashCode1.Should().NotBe(hashCode2); } - #endregion } diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/ThumbnailTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/ThumbnailTests.cs index 177259d8..0b085c48 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/ThumbnailTests.cs +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileManagementAggregate/ValueObjects/ThumbnailTests.cs @@ -17,11 +17,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.ValueO [ExcludeFromCodeCoverage] public class ThumbnailTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ThumbnailFixture _thumbnailFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class ThumbnailTests { _thumbnailFixture = new ThumbnailFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Constructor_ShouldSetPropertiesCorrectly() { @@ -133,5 +128,4 @@ public class ThumbnailTests components[0].Should().Be(thumbnail.Type); components[1].Should().BeEquivalentTo(thumbnail.Bytes); } - #endregion } diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Utilities/OptionsBuilderFluentValidationUtilitiesTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Utilities/OptionsBuilderFluentValidationUtilitiesTests.cs index 4d7ffb8d..f72c115c 100644 --- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Utilities/OptionsBuilderFluentValidationUtilitiesTests.cs +++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Utilities/OptionsBuilderFluentValidationUtilitiesTests.cs @@ -22,11 +22,8 @@ namespace Lumina.Infrastructure.UnitTests.Common.Utilities; [ExcludeFromCodeCoverage] public class OptionsBuilderFluentValidationUtilitiesTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -34,9 +31,7 @@ public class OptionsBuilderFluentValidationUtilitiesTests { _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void ValidateFluently_WhenCalled_ShouldRegisterFluentValidationOptions() { @@ -87,5 +82,4 @@ public class OptionsBuilderFluentValidationUtilitiesTests fluentValidationOptions.Should().NotBeNull(); fluentValidationOptions!.Name.Should().Be(name); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validation/FluentValidationOptionsTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validation/FluentValidationOptionsTests.cs index 16bf384a..c29e951e 100644 --- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validation/FluentValidationOptionsTests.cs +++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validation/FluentValidationOptionsTests.cs @@ -21,11 +21,8 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validation; [ExcludeFromCodeCoverage] public class FluentValidationOptionsTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -33,9 +30,7 @@ public class FluentValidationOptionsTests { _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Validate_WhenMatchingName_ShouldValidateOptions() { @@ -131,5 +126,4 @@ public class FluentValidationOptionsTests .Which.Should().Contain("Options validation failed for 'PropertyName' with error: 'Error Message'"); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsModelValidatorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsModelValidatorTests.cs index f7ac6348..c046626e 100644 --- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsModelValidatorTests.cs +++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsModelValidatorTests.cs @@ -17,12 +17,9 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validators; [ExcludeFromCodeCoverage] public class CommonSettingsModelValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly CommonSettingsModelValidator _validator; private readonly IFixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -31,9 +28,7 @@ public class CommonSettingsModelValidatorTests _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); _validator = new(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void CommonSettingsModelValidator_WhenThemeProvided_ShouldNotHaveValidationError() { @@ -66,5 +61,4 @@ public class CommonSettingsModelValidatorTests result.Errors.Should().ContainSingle() .Which.ErrorMessage.Should().Be(Errors.Configuration.ApplicationThemeCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsModelValidatorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsModelValidatorTests.cs index 91f39926..afe33f36 100644 --- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsModelValidatorTests.cs +++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsModelValidatorTests.cs @@ -16,12 +16,9 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validators; [ExcludeFromCodeCoverage] public class DatabaseSettingsModelValidatorTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly DatabaseSettingsModelValidator _validator; private readonly IFixture _fixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -30,9 +27,7 @@ public class DatabaseSettingsModelValidatorTests _fixture = new Fixture().Customize(new AutoNSubstituteCustomization()); _validator = new(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void DatabaseSettingsModelValidator_WhenDefaultConnectionProvided_ShouldNotHaveValidationError() { @@ -65,5 +60,4 @@ public class DatabaseSettingsModelValidatorTests result.Errors.Should().ContainSingle() .Which.ErrorMessage.Should().Be(Errors.Configuration.DatabaseConnectionStringCannotBeEmpty.Code); } - #endregion } \ No newline at end of file diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/ApiControllerTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/ApiControllerTests.cs index d0946399..3c606339 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/ApiControllerTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/ApiControllerTests.cs @@ -21,13 +21,10 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.Common; [ExcludeFromCodeCoverage] public class ApiControllerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ApiControllerFixture _sut; private readonly HttpContext _mockHttpContext; private readonly ProblemDetailsFactory _mockProblemDetailsFactory; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -42,9 +39,7 @@ public class ApiControllerTests }; _sut.ProblemDetailsFactory = _mockProblemDetailsFactory; } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public void Problem_WhenCalledWithNoErrors_ShouldReturnGenericProblem() { @@ -280,5 +275,4 @@ public class ApiControllerTests validationProblem.Errors["Code1"].Should().Contain("Description1"); validationProblem.Errors["Code2"].Should().Contain("Description2"); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/Fixtures/ApiControllerFixture.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/Fixtures/ApiControllerFixture.cs index a12a0506..7a51238e 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/Fixtures/ApiControllerFixture.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/Common/Fixtures/ApiControllerFixture.cs @@ -14,7 +14,6 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.Common.Fixtures; [ExcludeFromCodeCoverage] public class ApiControllerFixture : ApiController { - #region ===================================================================== METHODS =================================================================================== /// /// Returns a standardized error response using the format. /// @@ -34,5 +33,4 @@ public class ApiControllerFixture : ApiController { return ValidationProblem(errors); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs index 77f625a9..956307b5 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DirectoriesControllerTests.cs @@ -27,14 +27,11 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement; [ExcludeFromCodeCoverage] public class DirectoriesControllerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly ISender _mockMediator; private readonly DirectoriesController _sut; private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -45,9 +42,7 @@ public class DirectoriesControllerTests _sut = new DirectoriesController(_mockMediator); _fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetDirectoryTree_WhenCalled_ShouldReturnFileSystemTreeNodeResponses() { @@ -230,5 +225,4 @@ public class DirectoriesControllerTests List actualResponses = await result.ToListAsync(); actualResponses.Should().BeEmpty(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DrivesControllerTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DrivesControllerTests.cs index 2b259904..d7dc628a 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DrivesControllerTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/DrivesControllerTests.cs @@ -27,13 +27,10 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement; [ExcludeFromCodeCoverage] public class DrivesControllerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mockMediator; private readonly DrivesController _sut; private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -43,9 +40,7 @@ public class DrivesControllerTests _sut = new DrivesController(_mockMediator); _fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetDrives_WhenCalled_ShouldReturnOkResultWithFileSystemTreeNodeResponses() { @@ -130,17 +125,25 @@ public class DrivesControllerTests { // Arrange CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask>>(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return ErrorOrFactory.From(_fileSystemTreeNodeResponseFixture.CreateMany(3, 1, 1).AsEnumerable()); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.GetDrives(cts.Token)); + // Act + Task operationTask = _sut.GetDrives(cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs index 60d0d2d7..ddbef04a 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FileSystemControllerTests.cs @@ -21,12 +21,9 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement; [ExcludeFromCodeCoverage] public class FileSystemControllerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mockMediator; private readonly FileSystemController _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -35,9 +32,7 @@ public class FileSystemControllerTests _mockMediator = Substitute.For(); _sut = new FileSystemController(_mockMediator); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetType_WhenCalled_ShouldReturnOkResultWithFileSystemTypeResponse() { @@ -96,17 +91,25 @@ public class FileSystemControllerTests { // Arrange CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return new FileSystemTypeResponse(PlatformType.Windows); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.GetType(cts.Token)); + // Act + Task operationTask = _sut.GetType(cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FilesControllerTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FilesControllerTests.cs index b1282a00..46516636 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FilesControllerTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/FilesControllerTests.cs @@ -27,14 +27,11 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement; [ExcludeFromCodeCoverage] public class FilesControllerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly IFixture _fixture; private readonly ISender _mockMediator; private readonly FilesController _sut; private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -45,9 +42,7 @@ public class FilesControllerTests _sut = new FilesController(_mockMediator); _fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetTreeFiles_WhenCalled_ShouldReturnFileSystemTreeNodeResponses() { @@ -167,5 +162,4 @@ public class FilesControllerTests List actualResponses = await result.ToListAsync(); actualResponses.Should().BeEmpty(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs index 19dbba4e..06c116b1 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/FileSystemTreeNodeResponseFixture.cs @@ -15,11 +15,8 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement.Fixt [ExcludeFromCodeCoverage] public class FileSystemTreeNodeResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a single with a nested structure. /// @@ -58,5 +55,4 @@ public class FileSystemTreeNodeResponseFixture { return Enumerable.Range(0, count).Select(_ => Create(0, maxDepth, maxChildren)).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSegmentResponseFixture.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSegmentResponseFixture.cs index 97a2d3e5..eedceead 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSegmentResponseFixture.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSegmentResponseFixture.cs @@ -14,11 +14,8 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement.Fixt [ExcludeFromCodeCoverage] public class PathSegmentResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -37,5 +34,4 @@ public class PathSegmentResponseFixture { return Enumerable.Range(0, count).Select(_ => Create()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSeparatorResponseFixture.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSeparatorResponseFixture.cs index f754d790..56b2745f 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSeparatorResponseFixture.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/PathSeparatorResponseFixture.cs @@ -14,11 +14,8 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement.Fixt [ExcludeFromCodeCoverage] public class PathSeparatorResponseFixture { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly Faker _faker = new(); - #endregion - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid . /// @@ -37,5 +34,4 @@ public class PathSeparatorResponseFixture { return Enumerable.Range(0, count).Select(_ => Create()).ToList(); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/ThumbnailResponseFixture.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/ThumbnailResponseFixture.cs index 2fda7c96..0e27a212 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/ThumbnailResponseFixture.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/Fixtures/ThumbnailResponseFixture.cs @@ -13,7 +13,6 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement.Fixt [ExcludeFromCodeCoverage] public class ThumbnailResponseFixture { - #region ===================================================================== METHODS =================================================================================== /// /// Creates a random valid query to get a thumbnail. /// @@ -28,5 +27,4 @@ public class ThumbnailResponseFixture .RuleFor(x => x.Type, f => f.PickRandom()) .RuleFor(x => x.Bytes, f => f.Random.Bytes(20)); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/PathControllerTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/PathControllerTests.cs index 7c0ce137..a751ce21 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/PathControllerTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/PathControllerTests.cs @@ -33,14 +33,11 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement; [ExcludeFromCodeCoverage] public class PathControllerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mockMediator; private readonly PathController _sut; private readonly PathSegmentResponseFixture _pathSegmentResponseFixture; private readonly PathSeparatorResponseFixture _pathSeparatorResponseFixture; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -51,9 +48,7 @@ public class PathControllerTests _pathSegmentResponseFixture = new PathSegmentResponseFixture(); _pathSeparatorResponseFixture = new PathSeparatorResponseFixture(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetPathRoot_WhenCalled_ShouldReturnOkResultWithPathSegmentResponse() { @@ -153,17 +148,26 @@ public class PathControllerTests // Arrange string path = @"C:\Users\TestUser"; CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask>(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return ErrorOrFactory.From(_pathSegmentResponseFixture.Create()); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.GetPathRoot(path, cts.Token)); + // Act + Task operationTask = _sut.GetPathRoot(path, cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } [Fact] @@ -204,17 +208,26 @@ public class PathControllerTests { // Arrange CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return _pathSeparatorResponseFixture.Create(); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.GetPathSeparator(cts.Token)); + // Act + Task operationTask = _sut.GetPathSeparator(cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } [Fact] @@ -319,20 +332,29 @@ public class PathControllerTests // Arrange string path = @"C:\Users\TestUser\Documents"; CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask>>(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return ErrorOrFactory.From(new List { _pathSegmentResponseFixture.Create() }.AsEnumerable()); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.GetPathParent(path, cts.Token)); + // Act + Task operationTask = _sut.GetPathParent(path, cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } [Fact] @@ -437,17 +459,26 @@ public class PathControllerTests string originalPath = @"C:\Users"; string newPath = "TestUser"; CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask>(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return ErrorOrFactory.From(_pathSegmentResponseFixture.Create()); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.CombinePath(originalPath, newPath, cts.Token)); + // Act + Task operationTask = _sut.CombinePath(originalPath, newPath, cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } [Fact] @@ -553,20 +584,29 @@ public class PathControllerTests // Arrange string path = @"C:\Users\TestUser\Documents"; CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask>>(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return ErrorOrFactory.From(new List { _pathSegmentResponseFixture.Create() }.AsEnumerable()); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.SplitPath(path, cts.Token)); + // Act + Task operationTask = _sut.SplitPath(path, cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } [Fact] @@ -610,17 +650,26 @@ public class PathControllerTests // Arrange string path = @"C:\Users\TestUser\Documents"; CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return new PathValidResponse(true); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.ValidatePath(path, cts.Token)); + // Act + Task operationTask = _sut.ValidatePath(path, cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } [Fact] @@ -664,17 +713,25 @@ public class PathControllerTests // Arrange string path = @"C:\Users\TestUser\Documents"; CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return new PathExistsResponse(true); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.CheckPathExists(path, true, cts.Token)); + // Act + Task operationTask = _sut.CheckPathExists(path, true, cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs index 47215f91..07e9e129 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Controllers/FileManagement/ThumbnailsControllerTests.cs @@ -29,12 +29,9 @@ namespace Lumina.Presentation.Api.UnitTests.Core.Controllers.FileManagement; [ExcludeFromCodeCoverage] public class ThumbnailsControllerTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly ISender _mockMediator; private readonly ThumbnailsController _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -43,9 +40,7 @@ public class ThumbnailsControllerTests _mockMediator = Substitute.For(); _sut = new ThumbnailsController(_mockMediator); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task GetThumbnail_WhenCalled_ShouldReturnFileResultWithThumbnailResponse() { @@ -138,17 +133,25 @@ public class ThumbnailsControllerTests string path = "/path/to/file.jpg"; int quality = 80; CancellationTokenSource cts = new(); + TaskCompletionSource operationStarted = new(); + TaskCompletionSource cancellationRequested = new(); _mockMediator.Send(Arg.Any(), Arg.Any()) .Returns(callInfo => new ValueTask>(Task.Run(async () => { - await Task.Delay(100, callInfo.Arg()); + operationStarted.SetResult(true); + await cancellationRequested.Task; + callInfo.Arg().ThrowIfCancellationRequested(); return ErrorOrFactory.From(ThumbnailResponseFixture.CreateThumbnailResponse()); }, callInfo.Arg()))); - // Act & Assert - cts.CancelAfter(50); - await Assert.ThrowsAnyAsync(() => _sut.GetThumbnail(path, quality, cts.Token)); + // Act + Task operationTask = _sut.GetThumbnail(path, quality, cts.Token); + await operationStarted.Task; + cts.Cancel(); + cancellationRequested.SetResult(true); + + // Assert + await Assert.ThrowsAnyAsync(() => operationTask); } - #endregion } diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/ModelBinders/UrlStringBinderTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/ModelBinders/UrlStringBinderTests.cs index 8d2cc57f..3394c360 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/ModelBinders/UrlStringBinderTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/ModelBinders/UrlStringBinderTests.cs @@ -17,11 +17,8 @@ namespace Lumina.Presentation.Api.UnitTests.Core.ModelBinders; [ExcludeFromCodeCoverage] public class UrlStringBinderTests { - #region ================================================================== FIELD MEMBERS ================================================================================ private readonly UrlStringBinder _sut; - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// @@ -29,9 +26,7 @@ public class UrlStringBinderTests { _sut = new UrlStringBinder(); } - #endregion - #region ===================================================================== METHODS =================================================================================== [Fact] public async Task BindModelAsync_WhenBindingContextIsNull_ShouldThrowArgumentNullException() { @@ -116,5 +111,4 @@ public class UrlStringBinderTests // Assert mockBindingContext.ValueProvider.Received(1).GetValue(MODEL_NAME); } - #endregion }