mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
eliminates region sections
This commit is contained in:
1 parent
705c02b90d
commit
405fc1ff9a
370 files changed
+47
-1618
No files matched your search
@@ -18,11 +18,8 @@ namespace Lumina.Application.Common.Behaviors;
|
||||
public class ValidationBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IRequest<TResponse>
|
||||
where TResponse : IErrorOr
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IValidator<TRequest>? _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ValidationBehavior{TRequest, TResponse}"/> class.
|
||||
/// </summary>
|
||||
@@ -31,9 +28,7 @@ public class ValidationBehavior<TRequest, TResponse> : IPipelineBehavior<TReques
|
||||
{
|
||||
_validator = validator;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Pipeline handler. Perform any additional behavior and await the <paramref name="next"/> delegate as necessary.
|
||||
/// </summary>
|
||||
@@ -56,5 +51,4 @@ public class ValidationBehavior<TRequest, TResponse> : IPipelineBehavior<TReques
|
||||
// this is acceptable because we DO know that we will always have a list of errors of type ErrorOr (check the generic constraint at the top of the class!)
|
||||
return (dynamic)errors;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -13,7 +13,6 @@ namespace Lumina.Application.Common.Converters;
|
||||
/// <typeparam name="TValue">The type of the value represented by the <see cref="Optional{TValue}"/> structure.</typeparam>
|
||||
public class OptionalJsonConverter<TValue> : JsonConverter<Optional<TValue>>
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Reads and converts the JSON to an instance of <see cref="Optional{TValue}"/>.
|
||||
/// </summary>
|
||||
@@ -42,5 +41,4 @@ public class OptionalJsonConverter<TValue> : JsonConverter<Optional<TValue>>
|
||||
else
|
||||
writer.WriteNullValue();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace Lumina.Application.Common.Converters;
|
||||
/// </summary>
|
||||
public class OptionalJsonConverterFactory : JsonConverterFactory
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Determines whether the converter can convert the specified type.
|
||||
/// </summary>
|
||||
@@ -36,5 +35,4 @@ public class OptionalJsonConverterFactory : JsonConverterFactory
|
||||
typeof(OptionalJsonConverter<>).MakeGenericType(valueType))!;
|
||||
return converter;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -10,11 +10,9 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
/// </summary>
|
||||
public interface IDeleteAllRepositoryAction
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Deletes all entities from the storage medium.
|
||||
/// </summary>
|
||||
/// <returns>An <see cref="ErrorOr{TValue}"/> representing either a successfull operation, or an error.</returns>
|
||||
Task<ErrorOr<Deleted>> DeleteAllAsync();
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
/// <typeparam name="TId">The type used for the identifier of the respository. It should not be <see langword="null"/>.</typeparam>
|
||||
public interface IDeleteByIdRepositoryAction<TId> where TId : notnull
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Deletes an element identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
@@ -20,5 +19,4 @@ public interface IDeleteByIdRepositoryAction<TId> where TId : notnull
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="ErrorOr{TValue}"/> representing either a successfull operation, or an error.</returns>
|
||||
Task<ErrorOr<Deleted>> DeleteByIdAsync(TId id, CancellationToken cancellationToken);
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -14,12 +14,10 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
/// <typeparam name="TModel">The type used as a result for the "get all" action. It should implement <see cref="IStorageEntity"/>.</typeparam>
|
||||
public interface IGetAllRepositoryAction<TModel> where TModel : IStorageEntity
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Gets all data of type <typeparamref name="TModel"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="ErrorOr{TValue}"/> containing either a collection of <typeparamref name="TModel"/>, or an error.</returns>
|
||||
Task<ErrorOr<IEnumerable<TModel>>> GetAllAsync(CancellationToken cancellationToken);
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -15,7 +15,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
public interface IGetByIdRepositoryAction<TModel, TId> where TModel : IStorageEntity
|
||||
where TId : notnull
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Gets an element of type <typeparamref name="TModel"/> identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
@@ -23,5 +22,4 @@ public interface IGetByIdRepositoryAction<TModel, TId> where TModel : IStorageEn
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="ErrorOr{TValue}"/> containing either a <typeparamref name="TModel"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
Task<ErrorOr<TModel?>> GetByIdAsync(TId id, CancellationToken cancellationToken);
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -13,7 +13,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
/// <typeparam name="TModel">The type used for the insert action. It should implement <see cref="IStorageEntity"/>.</typeparam>
|
||||
public interface IInsertRepositoryAction<TModel> where TModel : IStorageEntity
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Saves an element of type <typeparamref name="TModel"/> in the storage medium.
|
||||
/// </summary>
|
||||
@@ -21,5 +20,4 @@ public interface IInsertRepositoryAction<TModel> where TModel : IStorageEntity
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="ErrorOr{TValue}"/> representing either a successfull operation, or an error.</returns>
|
||||
Task<ErrorOr<Created>> InsertAsync(TModel data, CancellationToken cancellationToken);
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -13,7 +13,6 @@ namespace Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
/// <typeparam name="TModel">The type used for the update action. It should implement <see cref="IStorageEntity"/>.</typeparam>
|
||||
public interface IUpdateRepositoryAction<TModel> where TModel : IStorageEntity
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Updates <paramref name="data"/> in the storage medium.
|
||||
/// </summary>
|
||||
@@ -21,5 +20,4 @@ public interface IUpdateRepositoryAction<TModel> where TModel : IStorageEntity
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="ErrorOr{TValue}"/> representing either a successfull operation, or an error.</returns>
|
||||
Task<ErrorOr<Updated>> UpdateAsync(TModel data, CancellationToken cancellationToken);
|
||||
#endregion
|
||||
}
|
||||
@@ -10,7 +10,6 @@ namespace Lumina.Application.Common.DataAccess.UoW;
|
||||
/// </summary>
|
||||
public interface IUnitOfWork
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Exposes a repository of type <typeparamref name="TRepository"/> to the Business Layer.
|
||||
/// </summary>
|
||||
@@ -33,5 +32,4 @@ public interface IUnitOfWork
|
||||
/// Commits a transaction.
|
||||
/// </summary>
|
||||
void CommitTransaction();
|
||||
#endregion
|
||||
}
|
||||
@@ -14,7 +14,6 @@ namespace Lumina.Application.Common.DependencyInjection;
|
||||
/// </summary>
|
||||
public static class ApplicationLayerServices
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Registers the services of the Application layer into the dependency injection container.
|
||||
/// </summary>
|
||||
@@ -42,5 +41,4 @@ public static class ApplicationLayerServices
|
||||
|
||||
return services;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -15,7 +15,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement;
|
||||
/// </summary>
|
||||
public class DirectoryMappingConfig : IRegister
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Registers the mapping configuration.
|
||||
/// </summary>
|
||||
@@ -48,5 +47,4 @@ public class DirectoryMappingConfig : IRegister
|
||||
DateTime.Now
|
||||
));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -11,7 +11,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement;
|
||||
/// </summary>
|
||||
public class FileMappingConfig : IRegister
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Registers the mapping configuration.
|
||||
/// </summary>
|
||||
@@ -35,5 +34,4 @@ public class FileMappingConfig : IRegister
|
||||
src.Size
|
||||
));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -15,7 +15,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement;
|
||||
/// </summary>
|
||||
public class FileSystemTreeMappingConfig : IRegister
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Registers the mapping configuration.
|
||||
/// </summary>
|
||||
@@ -63,5 +62,4 @@ public class FileSystemTreeMappingConfig : IRegister
|
||||
dest.Children = [];
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -11,7 +11,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement;
|
||||
/// </summary>
|
||||
public class PathSegmentMappingConfig : IRegister
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Registers the mapping configuration.
|
||||
/// </summary>
|
||||
@@ -22,5 +21,4 @@ public class PathSegmentMappingConfig : IRegister
|
||||
.Map(dest => dest.Path, src => src.Name)
|
||||
.MapToConstructor(true);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -11,7 +11,6 @@ namespace Lumina.Application.Common.Mapping.FileManagement;
|
||||
/// </summary>
|
||||
public class ThumbnailMappingConfig : IRegister
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Registers the mapping configuration.
|
||||
/// </summary>
|
||||
@@ -23,5 +22,4 @@ public class ThumbnailMappingConfig : IRegister
|
||||
.Map(dest => dest.Bytes, src => src.Bytes)
|
||||
.MapToConstructor(true);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -20,7 +20,6 @@ namespace Lumina.Application.Common.Mapping.WrittenContentLibrary.BookLibrary;
|
||||
/// </summary>
|
||||
public class BookMappingConfig : IRegister
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Registers the mapping configuration.
|
||||
/// </summary>
|
||||
@@ -130,5 +129,4 @@ public class BookMappingConfig : IRegister
|
||||
).Value).ToList()
|
||||
).Value);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Reference in new issue
Block a user