eliminates region sections

This commit is contained in:
BinaryAlley committed 2024-10-12 22:03:57 +03:00
1 parent 705c02b90d
commit 405fc1ff9a
370 files changed
+47 -1618

No files matched your search

@@ -17,7 +17,6 @@ namespace Lumina.Presentation.Api.Core.Controllers.Common;
[ApiVersion("1.0")]
public abstract class ApiController : ControllerBase
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Handles controllers errors.
/// </summary>
@@ -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
}
@@ -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 =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="DirectoriesController"/> class.
/// </summary>
@@ -35,9 +32,7 @@ public class DirectoriesController : ApiController
{
_mediator = mediator;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Gets the tree of expanded directories leading up to <paramref name="path"/>, with the additional list of drives, and children of the last child directory.
/// </summary>
@@ -103,5 +98,4 @@ public class DirectoriesController : ApiController
}
}
}
#endregion
}
@@ -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 =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="DrivesController"/> class.
/// </summary>
@@ -32,9 +29,7 @@ public class DrivesController : ApiController
{
_mediator = mediator;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Controller action for getting the list of all file system drives.
/// </summary>
@@ -45,5 +40,4 @@ public class DrivesController : ApiController
ErrorOr<IEnumerable<FileSystemTreeNodeResponse>> result = await _mediator.Send(new GetDrivesQuery(), cancellationToken).ConfigureAwait(false);
return result.Match(result => Ok(result), errors => Problem(errors));
}
#endregion
}
@@ -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 =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="FileSystemController"/> class.
/// </summary>
@@ -30,9 +27,7 @@ public class FileSystemController : ApiController
{
_mediator = mediator;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Gets the type of the file system.
/// </summary>
@@ -43,5 +38,4 @@ public class FileSystemController : ApiController
FileSystemTypeResponse platformType = await _mediator.Send(new GetFileSystemQuery(), cancellationToken).ConfigureAwait(false);
return Ok(platformType);
}
#endregion
}
@@ -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 =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="FilesController"/> class.
/// </summary>
@@ -34,9 +31,7 @@ public class FilesController : ApiController
{
_mediator = mediator;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Gets the files of <paramref name="path"/>.
/// </summary>
@@ -80,5 +75,4 @@ public class FilesController : ApiController
}
}
}
#endregion
}
@@ -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 =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="PathController"/> class.
/// </summary>
@@ -39,9 +36,7 @@ public class PathController : ApiController
{
_mediator = mediator;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Gets the root of <paramref name="path"/>.
/// </summary>
@@ -126,5 +121,4 @@ public class PathController : ApiController
PathExistsResponse result = await _mediator.Send(new CheckPathExistsQuery(path, includeHiddenElements), cancellationToken).ConfigureAwait(false);
return Ok(result);
}
#endregion
}
@@ -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 =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="ThumbnailsController"/> class.
/// </summary>
@@ -33,9 +30,7 @@ public class ThumbnailsController : ApiController
{
_mediator = mediator;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Gets the thumbnail of a file identified by of <paramref name="path"/>.
/// </summary>
@@ -48,5 +43,4 @@ public class ThumbnailsController : ApiController
ErrorOr<ThumbnailResponse> getResult = await _mediator.Send(new GetThumbnailQuery(path, quality), cancellationToken);
return getResult.Match(result => File(result.Bytes, MimeTypes.GetMimeType(result.Type)), errors => Problem(errors));
}
#endregion
}
@@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.Core.Controllers.Maintenance;
[Route("[controller]")]
public class HealthController : ApiController
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Checks if the application is healthy.
/// </summary>
@@ -22,5 +21,4 @@ public class HealthController : ApiController
// TODO: to be implemented
return await Task.FromResult(Ok());
}
#endregion
}
@@ -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 =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="BooksController"/> class.
/// </summary>
@@ -34,9 +31,7 @@ public class BooksController : ApiController
_mediator = mediator;
_mapper = mapper;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Controller action for getting the list of all books.
/// </summary>
@@ -57,5 +52,4 @@ public class BooksController : ApiController
ErrorOr.ErrorOr<Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.Book> result = await _mediator.Send(_mapper.Map<AddBookCommand>(request)).ConfigureAwait(false);
return result.Match(result => Created($"/api/v1/books/{result.Id}", result), Problem);
}
#endregion
}