diff --git a/.editorconfig b/.editorconfig index 4bbf8c9..fb35d42 100644 --- a/.editorconfig +++ b/.editorconfig @@ -154,6 +154,18 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false csharp_space_between_parentheses = false csharp_space_between_square_brackets = false +# Namespace declaration preferences (IDE0160 and IDE0161) +csharp_style_namespace_declarations = file_scoped +# 'var' preferences (IDE0007 and IDE0008) +csharp_style_var_for_built_in_types = true +csharp_style_var_elsewhere = true +csharp_style_var_when_type_is_apparent = true + +# 'using' directive placement (IDE0065) +csharp_using_directive_placement = inside_namespace + +# Use primary constructor (IDE0290) +csharp_style_prefer_primary_constructors = false ################################################################################## # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ diff --git a/Directory.Build.props b/Directory.Build.props index 031914b..7e1c081 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -30,7 +30,7 @@ - $(NoWarn);NETSDK1206;xUnit1028;CS1591 + $(NoWarn);NETSDK1206;xUnit1028;CS1591;NU1902;NU1903;NU1904 diff --git a/src/NKZSoft.Template.Application/Common/Behaviours/ValidationBehaviour.cs b/src/NKZSoft.Template.Application/Common/Behaviours/ValidationBehaviour.cs index fa3ee05..946f57f 100644 --- a/src/NKZSoft.Template.Application/Common/Behaviours/ValidationBehaviour.cs +++ b/src/NKZSoft.Template.Application/Common/Behaviours/ValidationBehaviour.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Application.Common.Behaviours; using Exceptions; +using NKZSoft.Template.Common.Extensions; public sealed class ValidationBehaviour(IEnumerable> validators) : IPipelineBehavior diff --git a/src/NKZSoft.Template.Application/Common/Handlers/HandlerBase.cs b/src/NKZSoft.Template.Application/Common/Handlers/HandlerBase.cs index 87ad651..a982593 100644 --- a/src/NKZSoft.Template.Application/Common/Handlers/HandlerBase.cs +++ b/src/NKZSoft.Template.Application/Common/Handlers/HandlerBase.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Application.Common.Handlers; using Interfaces; +using NKZSoft.Template.Common.Extensions; public abstract class HandlerBase : IRequestHandler where TQ : IRequest diff --git a/src/NKZSoft.Template.Application/Common/Handlers/HandlerDbBase.cs b/src/NKZSoft.Template.Application/Common/Handlers/HandlerDbBase.cs index a8fa693..3cb81cd 100644 --- a/src/NKZSoft.Template.Application/Common/Handlers/HandlerDbBase.cs +++ b/src/NKZSoft.Template.Application/Common/Handlers/HandlerDbBase.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Application.Common.Handlers; using Interfaces; +using NKZSoft.Template.Common.Extensions; public abstract class HandlerDbBase : HandlerBase where TQ : IRequest diff --git a/src/NKZSoft.Template.Application/Common/Handlers/StreamRequestHandlerBase.cs b/src/NKZSoft.Template.Application/Common/Handlers/StreamRequestHandlerBase.cs index 58ce70b..8fe5ce4 100644 --- a/src/NKZSoft.Template.Application/Common/Handlers/StreamRequestHandlerBase.cs +++ b/src/NKZSoft.Template.Application/Common/Handlers/StreamRequestHandlerBase.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Application.Common.Handlers; using Interfaces; +using NKZSoft.Template.Common.Extensions; public abstract class StreamRequestHandlerBase : IStreamRequestHandler where TRequest : IStreamRequest diff --git a/src/NKZSoft.Template.Application/DependencyInjectionExtensions.cs b/src/NKZSoft.Template.Application/DependencyInjectionExtensions.cs index 399079a..c3cbe71 100644 --- a/src/NKZSoft.Template.Application/DependencyInjectionExtensions.cs +++ b/src/NKZSoft.Template.Application/DependencyInjectionExtensions.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Application; using Common.Behaviours; +using NKZSoft.Template.Common.Extensions; public static class DependencyInjectionExtensions { diff --git a/src/NKZSoft.Template.Application/GlobalUsings.cs b/src/NKZSoft.Template.Application/GlobalUsings.cs index edf4240..785c73e 100644 --- a/src/NKZSoft.Template.Application/GlobalUsings.cs +++ b/src/NKZSoft.Template.Application/GlobalUsings.cs @@ -18,8 +18,6 @@ global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.DependencyInjection.Extensions; global using NKZSoft.Template.Application.TodoItems.Specifications; -global using NKZSoft.Template.Common; - global using NKZSoft.Template.Domain.AggregatesModel.ToDoAggregates.Entities; global using NKZSoft.Template.Domain.Events; global using NKZSoft.Template.Events.ToDoItem.Create; diff --git a/src/NKZSoft.Template.Application/TodoItems/Commands/Create/CreateToDoItemCommandHandler.cs b/src/NKZSoft.Template.Application/TodoItems/Commands/Create/CreateToDoItemCommandHandler.cs index cad65d6..560e6e4 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Commands/Create/CreateToDoItemCommandHandler.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Commands/Create/CreateToDoItemCommandHandler.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Application.TodoItems.Commands.Create; using Common.Repositories.PostgreSql; +using NKZSoft.Template.Common.Extensions; public sealed class CreateToDoItemCommandHandler(IToDoItemRepository repository) : IRequestHandler> diff --git a/src/NKZSoft.Template.Application/TodoItems/Commands/CreateInRedis/CreateToDoItemRedisCommandHandler.cs b/src/NKZSoft.Template.Application/TodoItems/Commands/CreateInRedis/CreateToDoItemRedisCommandHandler.cs index 8e28574..62e74f4 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Commands/CreateInRedis/CreateToDoItemRedisCommandHandler.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Commands/CreateInRedis/CreateToDoItemRedisCommandHandler.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Application.TodoItems.Commands.CreateInRedis; using Common.Repositories.Redis; +using NKZSoft.Template.Common.Extensions; public sealed class CreateToDoItemRedisCommandHandler(IToDoItemRedisRepository repository) : IRequestHandler> diff --git a/src/NKZSoft.Template.Application/TodoItems/Commands/Update/UpdateToDoItemCommandHandler.cs b/src/NKZSoft.Template.Application/TodoItems/Commands/Update/UpdateToDoItemCommandHandler.cs index 37add64..95ad9f1 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Commands/Update/UpdateToDoItemCommandHandler.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Commands/Update/UpdateToDoItemCommandHandler.cs @@ -2,6 +2,7 @@ using Common.Exceptions; using Common.Repositories.PostgreSql; +using NKZSoft.Template.Common.Extensions; public sealed class UpdateToDoItemCommandHandler : IRequestHandler { diff --git a/src/NKZSoft.Template.Application/TodoItems/Queries/GetItem/GetTodoItemDbQueryHandler.cs b/src/NKZSoft.Template.Application/TodoItems/Queries/GetItem/GetTodoItemDbQueryHandler.cs index dbf5d98..4f1506f 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Queries/GetItem/GetTodoItemDbQueryHandler.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Queries/GetItem/GetTodoItemDbQueryHandler.cs @@ -5,6 +5,7 @@ using Common.Interfaces; using Common.Repositories.PostgreSql; using NKZSoft.Template.Application.Models; +using NKZSoft.Template.Common.Extensions; public sealed class GetTodoItemDbQueryHandler( IToDoItemRepository repository, diff --git a/src/NKZSoft.Template.Application/TodoItems/Queries/GetItemFromRedis/GetTodoItemQueryFromRedisHandler.cs b/src/NKZSoft.Template.Application/TodoItems/Queries/GetItemFromRedis/GetTodoItemQueryFromRedisHandler.cs index 6a9e000..36d4fe5 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Queries/GetItemFromRedis/GetTodoItemQueryFromRedisHandler.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Queries/GetItemFromRedis/GetTodoItemQueryFromRedisHandler.cs @@ -5,6 +5,7 @@ using Common.Handlers; using Common.Interfaces; using Common.Repositories.Redis; +using NKZSoft.Template.Common.Extensions; public class GetTodoItemQueryFromRedisHandler : HandlerBase> { diff --git a/src/NKZSoft.Template.Application/TodoItems/Queries/GetPage/GetPageTodoDbQueryHandler.cs b/src/NKZSoft.Template.Application/TodoItems/Queries/GetPage/GetPageTodoDbQueryHandler.cs index 32f00ce..c45302a 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Queries/GetPage/GetPageTodoDbQueryHandler.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Queries/GetPage/GetPageTodoDbQueryHandler.cs @@ -5,6 +5,7 @@ using Common.Interfaces; using Common.Paging; using Common.Repositories.PostgreSql; +using NKZSoft.Template.Common.Extensions; internal sealed class GetPageTodoDbQueryHandler( IToDoItemRepository repository, diff --git a/src/NKZSoft.Template.Application/TodoItems/Queries/GetStream/GetStreamTodoItemsQueryHandler.cs b/src/NKZSoft.Template.Application/TodoItems/Queries/GetStream/GetStreamTodoItemsQueryHandler.cs index 6e59188..ef364e1 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Queries/GetStream/GetStreamTodoItemsQueryHandler.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Queries/GetStream/GetStreamTodoItemsQueryHandler.cs @@ -5,6 +5,7 @@ using Common.Handlers; using Common.Interfaces; using Common.Repositories.PostgreSql; +using NKZSoft.Template.Common.Extensions; public class GetStreamTodoItemsQueryHandler : StreamRequestHandlerBase { diff --git a/src/NKZSoft.Template.Application/TodoItems/Specifications/ToDoItemSpecification.cs b/src/NKZSoft.Template.Application/TodoItems/Specifications/ToDoItemSpecification.cs index a0515b4..2c4c490 100644 --- a/src/NKZSoft.Template.Application/TodoItems/Specifications/ToDoItemSpecification.cs +++ b/src/NKZSoft.Template.Application/TodoItems/Specifications/ToDoItemSpecification.cs @@ -8,7 +8,7 @@ internal sealed class ToDoItemSpecification : Specification { - private static readonly FrozenDictionary>> SortExpressions = + private static readonly FrozenDictionary>> _sortExpressions = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { { nameof(ToDoItemFilter.Id), item => item.Id }, @@ -70,23 +70,16 @@ private static ISpecificationBuilder Sort(ISpecificationBuilder Sort(ISpecificationBuilder specificationBuilder, SortDescriptor sort) { - if (SortExpressions.TryGetValue(sort.Field, out var se)) - { - return sort.Direction == EnumSortDirection.Desc + return _sortExpressions.TryGetValue(sort.Field, out var se) + ? (ISpecificationBuilder)(sort.Direction == EnumSortDirection.Desc ? specificationBuilder.OrderByDescending(se!) - : specificationBuilder.OrderBy(se!); - } - throw new BadRequestException($"Invalid field name {sort.Field}."); + : specificationBuilder.OrderBy(se!)) + : throw new BadRequestException($"Invalid field name {sort.Field}."); } } diff --git a/src/NKZSoft.Template.Common/Extensions/GuardClausesExtensions.cs b/src/NKZSoft.Template.Common/Extensions/GuardClausesExtensions.cs index 401a2ac..a7ebd6f 100644 --- a/src/NKZSoft.Template.Common/Extensions/GuardClausesExtensions.cs +++ b/src/NKZSoft.Template.Common/Extensions/GuardClausesExtensions.cs @@ -1,4 +1,4 @@ -namespace NKZSoft.Template.Common; +namespace NKZSoft.Template.Common.Extensions; public static class GuardClausesExtensions { diff --git a/src/NKZSoft.Template.Domain/Common/Enumeration.cs b/src/NKZSoft.Template.Domain/Common/Enumeration.cs index 3747801..3f289d7 100644 --- a/src/NKZSoft.Template.Domain/Common/Enumeration.cs +++ b/src/NKZSoft.Template.Domain/Common/Enumeration.cs @@ -51,12 +51,7 @@ private static T Parse(TK value, string description, Func predic public static bool operator ==(Enumeration? left, Enumeration? right) { - if (left is null) - { - return right is null; - } - - return left.Equals(right); + return left is null ? right is null : left.Equals(right); } public static bool operator !=(Enumeration left, Enumeration right) => !(left == right); diff --git a/src/NKZSoft.Template.Domain/Common/ValueObject.cs b/src/NKZSoft.Template.Domain/Common/ValueObject.cs index 4032fd6..fdffd7c 100644 --- a/src/NKZSoft.Template.Domain/Common/ValueObject.cs +++ b/src/NKZSoft.Template.Domain/Common/ValueObject.cs @@ -6,17 +6,7 @@ public abstract class ValueObject public static bool operator ==(ValueObject? left, ValueObject? right) { - if (left is null && right is null) - { - return true; - } - - if (left is null || right is null) - { - return false; - } - - return left.Equals(right); + return left is null && right is null || (left is not null && right is not null && left.Equals(right)); } public static bool operator !=(ValueObject? left, ValueObject? right) => !(left == right); diff --git a/src/NKZSoft.Template.EFCore.Caching.Redis/Extensions/ServiceCollectionExtensions.cs b/src/NKZSoft.Template.EFCore.Caching.Redis/Extensions/ServiceCollectionExtensions.cs index 22a2f33..85b891b 100644 --- a/src/NKZSoft.Template.EFCore.Caching.Redis/Extensions/ServiceCollectionExtensions.cs +++ b/src/NKZSoft.Template.EFCore.Caching.Redis/Extensions/ServiceCollectionExtensions.cs @@ -1,7 +1,7 @@ namespace NKZSoft.Template.EFCore.Caching.Redis.Extensions; -using Common; using Configuration; +using NKZSoft.Template.Common.Extensions; public static class ServiceCollectionExtensions { diff --git a/src/NKZSoft.Template.Events/ToDoItem/Create/ToDoItemCreatedIntegrationEvent.cs b/src/NKZSoft.Template.Events/ToDoItem/Create/ToDoItemCreatedIntegrationEvent.cs index decad18..0e34998 100644 --- a/src/NKZSoft.Template.Events/ToDoItem/Create/ToDoItemCreatedIntegrationEvent.cs +++ b/src/NKZSoft.Template.Events/ToDoItem/Create/ToDoItemCreatedIntegrationEvent.cs @@ -1,5 +1,4 @@ namespace NKZSoft.Template.Events.ToDoItem.Create; - using Interfaces; public sealed record ToDoItemCreatedIntegrationEvent(Guid Id, string Title, string? Note) : IIntegrationEvent; diff --git a/src/NKZSoft.Template.Events/ToDoItem/Update/ToDoItemUpdatedIntegrationEvent.cs b/src/NKZSoft.Template.Events/ToDoItem/Update/ToDoItemUpdatedIntegrationEvent.cs index a8a5468..244ede4 100644 --- a/src/NKZSoft.Template.Events/ToDoItem/Update/ToDoItemUpdatedIntegrationEvent.cs +++ b/src/NKZSoft.Template.Events/ToDoItem/Update/ToDoItemUpdatedIntegrationEvent.cs @@ -1,5 +1,4 @@ namespace NKZSoft.Template.Events.ToDoItem.Update; - using Interfaces; public sealed record ToDoItemUpdatedIntegrationEvent(Guid Id, string Name) : IIntegrationEvent; diff --git a/src/NKZSoft.Template.Infrastructure.Core/GlobalUsings.cs b/src/NKZSoft.Template.Infrastructure.Core/GlobalUsings.cs index 5639a1c..9691ffb 100644 --- a/src/NKZSoft.Template.Infrastructure.Core/GlobalUsings.cs +++ b/src/NKZSoft.Template.Infrastructure.Core/GlobalUsings.cs @@ -4,4 +4,3 @@ global using System.Diagnostics.CodeAnalysis; global using Microsoft.Extensions.DependencyInjection; global using NKZSoft.Template.Application.Common.Interfaces; -global using NKZSoft.Template.Common; \ No newline at end of file diff --git a/src/NKZSoft.Template.Infrastructure.Core/Services/CurrentUserService.cs b/src/NKZSoft.Template.Infrastructure.Core/Services/CurrentUserService.cs index 32d13d5..9dd3206 100644 --- a/src/NKZSoft.Template.Infrastructure.Core/Services/CurrentUserService.cs +++ b/src/NKZSoft.Template.Infrastructure.Core/Services/CurrentUserService.cs @@ -1,5 +1,7 @@ namespace NKZSoft.Template.Infrastructure.Core.Services; +using NKZSoft.Template.Common.Extensions; + public sealed class CurrentUserService(ICurrentUser currentUser) : ICurrentUserService { public ICurrentUser CurrentUser { get; } = currentUser.ThrowIfNull(); diff --git a/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContext.cs b/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContext.cs index 1d51b9a..ce3756f 100644 --- a/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContext.cs +++ b/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContext.cs @@ -1,14 +1,13 @@ -using NKZSoft.Template.Persistence.PostgreSQL.Common; -using NKZSoft.Template.Persistence.PostgreSQL.Extensions; - -namespace NKZSoft.Template.Persistence.PostgreSQL; +namespace NKZSoft.Template.Persistence.PostgreSQL; +using NKZSoft.Template.Common.Extensions; +using Common; +using Extensions; public class ApplicationDbContext : DbContext, IApplicationDbContext { private ICurrentUserService _currentUserService = null!; private IDateTime _dateTime = null!; private IMediator _mediator = null!; - private IDbInitializer _dbInitializer = null!; public ApplicationDbContext(DbContextOptions options) : base(options) @@ -17,7 +16,7 @@ public ApplicationDbContext(DbContextOptions options) public void InitContext(ICurrentUserService currentUserService, IDbInitializer dbInitializer, IDateTime dateTime, IMediator mediator) { - _dbInitializer = dbInitializer.ThrowIfNull(); + DbInitializer = dbInitializer.ThrowIfNull(); _currentUserService = currentUserService.ThrowIfNull(); _dateTime = dateTime.ThrowIfNull(); _mediator = mediator.ThrowIfNull(); @@ -28,7 +27,7 @@ public void InitContext(ICurrentUserService currentUserService, IDbInitializer d public DbContext AppDbContext => this; - public IDbInitializer DbInitializer => _dbInitializer; + public IDbInitializer? DbInitializer { get; private set; } public override async Task SaveChangesAsync(CancellationToken cancellationToken = default) { @@ -44,7 +43,7 @@ public override async Task SaveChangesAsync(CancellationToken cancellationT public async Task MigrateAsync() => await AppDbContext.Database.MigrateAsync().ConfigureAwait(false); - public async Task SeedAsync() => await _dbInitializer.SeedAsync(this).ConfigureAwait(false); + public async Task SeedAsync() => await DbInitializer!.SeedAsync(this).ConfigureAwait(false); private async Task DispatchDomainEventsAsync() { diff --git a/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContextFactory.cs b/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContextFactory.cs index 53fd704..239cc6a 100644 --- a/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContextFactory.cs +++ b/src/NKZSoft.Template.Persistence.PostgreSQL/ApplicationDbContextFactory.cs @@ -1,5 +1,7 @@ namespace NKZSoft.Template.Persistence.PostgreSQL; +using NKZSoft.Template.Common.Extensions; + public class ApplicationDbContextFactory : IDbContextFactory { private readonly IDbContextFactory _pooledFactory; diff --git a/src/NKZSoft.Template.Persistence.PostgreSQL/Extensions/ServiceCollectionExtension.cs b/src/NKZSoft.Template.Persistence.PostgreSQL/Extensions/ServiceCollectionExtension.cs index 31d92aa..b33c4f5 100644 --- a/src/NKZSoft.Template.Persistence.PostgreSQL/Extensions/ServiceCollectionExtension.cs +++ b/src/NKZSoft.Template.Persistence.PostgreSQL/Extensions/ServiceCollectionExtension.cs @@ -1,6 +1,7 @@ namespace NKZSoft.Template.Persistence.PostgreSQL.Extensions; using Configuration; +using NKZSoft.Template.Common.Extensions; public static class ServiceCollectionExtension { @@ -73,7 +74,7 @@ private static IServiceCollection ConfigureDbContextFactory(this IServiceCollect private static DbContextOptionsBuilder EnableDbLogging(this DbContextOptionsBuilder builder) => builder .LogTo( msg => Log.Logger.Information("{Msg}",msg), - new[] { DbLoggerCategory.Database.Name }) + [DbLoggerCategory.Database.Name,]) .EnableDetailedErrors() .EnableSensitiveDataLogging(); } diff --git a/src/NKZSoft.Template.Persistence.PostgreSQL/GlobalUsings.cs b/src/NKZSoft.Template.Persistence.PostgreSQL/GlobalUsings.cs index 6df5c49..d746dce 100644 --- a/src/NKZSoft.Template.Persistence.PostgreSQL/GlobalUsings.cs +++ b/src/NKZSoft.Template.Persistence.PostgreSQL/GlobalUsings.cs @@ -17,7 +17,6 @@ global using Microsoft.Extensions.Options; global using NKZSoft.FluentValidation.Options; global using NKZSoft.Template.Application.Common.Interfaces; -global using NKZSoft.Template.Common; global using NKZSoft.Template.Domain.AggregatesModel.ToDoAggregates.Entities; global using NKZSoft.Template.Domain.Common; global using Npgsql; diff --git a/src/NKZSoft.Template.Persistence.PostgreSQL/Migrations/20220930193027_InitialCreate.cs b/src/NKZSoft.Template.Persistence.PostgreSQL/Migrations/20220930193027_InitialCreate.cs index 0426f45..918787c 100644 --- a/src/NKZSoft.Template.Persistence.PostgreSQL/Migrations/20220930193027_InitialCreate.cs +++ b/src/NKZSoft.Template.Persistence.PostgreSQL/Migrations/20220930193027_InitialCreate.cs @@ -1,63 +1,61 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable +#nullable disable #pragma warning disable MA0048, AV1706 -namespace NKZSoft.Template.Persistence.PostgreSQL.Migrations +namespace NKZSoft.Template.Persistence.PostgreSQL.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; + +public partial class InitialCreate : Migration { - public partial class InitialCreate : Migration + protected override void Up(MigrationBuilder migrationBuilder) { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "ToDoLists", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - Created = table.Column(type: "timestamp with time zone", nullable: false), - CreatedBy = table.Column(type: "text", nullable: false), - Modified = table.Column(type: "timestamp with time zone", nullable: true), - ModifiedBy = table.Column(type: "text", nullable: true), - }, - constraints: table => table.PrimaryKey("PK_ToDoLists", x => x.Id)); + migrationBuilder.CreateTable( + name: "ToDoLists", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Created = table.Column(type: "timestamp with time zone", nullable: false), + CreatedBy = table.Column(type: "text", nullable: false), + Modified = table.Column(type: "timestamp with time zone", nullable: true), + ModifiedBy = table.Column(type: "text", nullable: true), + }, + constraints: table => table.PrimaryKey("PK_ToDoLists", x => x.Id)); - migrationBuilder.CreateTable( - name: "ToDoItems", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - Note = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - ToDoListId = table.Column(type: "uuid", nullable: true), - Created = table.Column(type: "timestamp with time zone", nullable: false), - CreatedBy = table.Column(type: "text", nullable: false), - Modified = table.Column(type: "timestamp with time zone", nullable: true), - ModifiedBy = table.Column(type: "text", nullable: true), - }, - constraints: table => - { - table.PrimaryKey("PK_ToDoItems", x => x.Id); - table.ForeignKey( - name: "FK_ToDoItems_ToDoLists_ToDoListId", - column: x => x.ToDoListId, - principalTable: "ToDoLists", - principalColumn: "Id"); - }); + migrationBuilder.CreateTable( + name: "ToDoItems", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Note = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + ToDoListId = table.Column(type: "uuid", nullable: true), + Created = table.Column(type: "timestamp with time zone", nullable: false), + CreatedBy = table.Column(type: "text", nullable: false), + Modified = table.Column(type: "timestamp with time zone", nullable: true), + ModifiedBy = table.Column(type: "text", nullable: true), + }, + constraints: table => + { + table.PrimaryKey("PK_ToDoItems", x => x.Id); + table.ForeignKey( + name: "FK_ToDoItems_ToDoLists_ToDoListId", + column: x => x.ToDoListId, + principalTable: "ToDoLists", + principalColumn: "Id"); + }); - migrationBuilder.CreateIndex( - name: "IX_ToDoItems_ToDoListId", - table: "ToDoItems", - column: "ToDoListId"); - } + migrationBuilder.CreateIndex( + name: "IX_ToDoItems_ToDoListId", + table: "ToDoItems", + column: "ToDoListId"); + } - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "ToDoItems"); + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ToDoItems"); - migrationBuilder.DropTable( - name: "ToDoLists"); - } + migrationBuilder.DropTable( + name: "ToDoLists"); } } diff --git a/src/NKZSoft.Template.Persistence.Redis/Extensions/ServiceCollectionExtension.cs b/src/NKZSoft.Template.Persistence.Redis/Extensions/ServiceCollectionExtension.cs index 6410613..1bd2bbf 100644 --- a/src/NKZSoft.Template.Persistence.Redis/Extensions/ServiceCollectionExtension.cs +++ b/src/NKZSoft.Template.Persistence.Redis/Extensions/ServiceCollectionExtension.cs @@ -1,9 +1,9 @@ namespace NKZSoft.Template.Persistence.Redis.Extensions; -using Common; using Configuration; using Repositories; using Microsoft.Extensions.DependencyInjection.Extensions; +using NKZSoft.Template.Common.Extensions; public static class ServiceCollectionExtension { @@ -47,7 +47,7 @@ public static IServiceCollection AddRedisPersistence(this IServiceCollection ser services.Scan(scan => scan .FromAssemblies(Assembly.GetExecutingAssembly()) - .AddClasses(classes => classes.AssignableTo(typeof(IRedisRepository))) + .AddClasses(classes => classes.AssignableTo()) .AsMatchingInterface() .WithScopedLifetime()); diff --git a/src/NKZSoft.Template.Persistence.Redis/Repositories/ToDoListRedisRepository.cs b/src/NKZSoft.Template.Persistence.Redis/Repositories/ToDoListRedisRepository.cs index 60b701f..31cbfec 100644 --- a/src/NKZSoft.Template.Persistence.Redis/Repositories/ToDoListRedisRepository.cs +++ b/src/NKZSoft.Template.Persistence.Redis/Repositories/ToDoListRedisRepository.cs @@ -1,7 +1,7 @@ namespace NKZSoft.Template.Persistence.Redis.Repositories; -using Common; using Configuration; +using NKZSoft.Template.Common.Extensions; public class ToDoListRedisRepository : IToDoItemRedisRepository, IRedisRepository { diff --git a/src/NKZSoft.Template.Presentation.Grpc/Mapper/MappingConfig.cs b/src/NKZSoft.Template.Presentation.Grpc/Mapper/MappingConfig.cs index 45ef137..6f048f8 100644 --- a/src/NKZSoft.Template.Presentation.Grpc/Mapper/MappingConfig.cs +++ b/src/NKZSoft.Template.Presentation.Grpc/Mapper/MappingConfig.cs @@ -41,10 +41,6 @@ public void Register(TypeAdapterConfig config) private static string? TransformErrorCode(IReason error) { - if (error.Metadata?.TryGetValue("ErrorCode", out var errorCode) != null && errorCode != null) - { - return errorCode as string; - } - return null; + return error.Metadata?.TryGetValue("ErrorCode", out var errorCode) != null && errorCode != null ? errorCode as string : null; } } diff --git a/src/NKZSoft.Template.Presentation.Grpc/Models/GetPageTodoItemsRequest.cs b/src/NKZSoft.Template.Presentation.Grpc/Models/GetPageTodoItemsRequest.cs index 5c502a7..03fc9da 100644 --- a/src/NKZSoft.Template.Presentation.Grpc/Models/GetPageTodoItemsRequest.cs +++ b/src/NKZSoft.Template.Presentation.Grpc/Models/GetPageTodoItemsRequest.cs @@ -4,5 +4,5 @@ public sealed record GetPageTodoItemsRequest : PageContext { [ProtoMember(1)] - public Guid[] Ids { get; init; } = Array.Empty(); + public Guid[] Ids { get; init; } = []; } diff --git a/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ErrorResponseExtensions.cs b/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ErrorResponseExtensions.cs index 40a7956..2803f82 100644 --- a/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ErrorResponseExtensions.cs +++ b/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ErrorResponseExtensions.cs @@ -12,10 +12,6 @@ private static IEnumerable TransformErrors(IEnumerable er private static string? TransformErrorCode(IReason error) { - if (error.Metadata?.TryGetValue("ErrorCode", out var errorCode) != null && errorCode != null) - { - return errorCode as string; - } - return null; + return error.Metadata?.TryGetValue("ErrorCode", out var errorCode) != null && errorCode != null ? errorCode as string : null; } } diff --git a/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ResultResponse.cs b/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ResultResponse.cs index efefafa..6022a87 100644 --- a/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ResultResponse.cs +++ b/src/NKZSoft.Template.Presentation.Grpc/Models/Result/ResultResponse.cs @@ -21,5 +21,5 @@ protected ResultResponse() public bool IsSuccess { get; init; } [ProtoMember(4)] - public ErrorResponse[] Errors { get; init; } = Array.Empty(); + public ErrorResponse[] Errors { get; init; } = []; } diff --git a/src/NKZSoft.Template.Presentation.Grpc/Models/ToDoItem/ToDoItemsResponse.cs b/src/NKZSoft.Template.Presentation.Grpc/Models/ToDoItem/ToDoItemsResponse.cs index 6a61a6d..e0ee7e7 100644 --- a/src/NKZSoft.Template.Presentation.Grpc/Models/ToDoItem/ToDoItemsResponse.cs +++ b/src/NKZSoft.Template.Presentation.Grpc/Models/ToDoItem/ToDoItemsResponse.cs @@ -6,5 +6,5 @@ public sealed record ToDoItemsResponse : ResultResponse { [ProtoMember(1)] - public ToDoItemDto[] Items { get; init; } = Array.Empty(); + public ToDoItemDto[] Items { get; init; } = []; } diff --git a/src/NKZSoft.Template.Presentation.Grpc/Services/IToDoItemService.cs b/src/NKZSoft.Template.Presentation.Grpc/Services/IToDoItemService.cs index eb237ed..a027e66 100644 --- a/src/NKZSoft.Template.Presentation.Grpc/Services/IToDoItemService.cs +++ b/src/NKZSoft.Template.Presentation.Grpc/Services/IToDoItemService.cs @@ -1,5 +1,4 @@ namespace NKZSoft.Template.Presentation.Grpc.Services; - using Models; using Models.ToDoItem; diff --git a/src/NKZSoft.Template.Presentation.Grpc/Services/ToDoItemService.cs b/src/NKZSoft.Template.Presentation.Grpc/Services/ToDoItemService.cs index baae025..24d83db 100644 --- a/src/NKZSoft.Template.Presentation.Grpc/Services/ToDoItemService.cs +++ b/src/NKZSoft.Template.Presentation.Grpc/Services/ToDoItemService.cs @@ -3,7 +3,7 @@ using Application.TodoItems.Queries.GetStream; using Models; using Models.ToDoItem; -using Common; +using NKZSoft.Template.Common.Extensions; public class ToDoItemService : IToDoItemService { diff --git a/src/NKZSoft.Template.Presentation.Rest/Controllers/BaseController.cs b/src/NKZSoft.Template.Presentation.Rest/Controllers/BaseController.cs index 3348694..a66e2e8 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Controllers/BaseController.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Controllers/BaseController.cs @@ -1,5 +1,7 @@ namespace NKZSoft.Template.Presentation.Rest.Controllers; +using NKZSoft.Template.Common.Extensions; + [ApiController] [Produces("application/json")] public abstract class BaseController : ControllerBase diff --git a/src/NKZSoft.Template.Presentation.Rest/Extensions/ApplicationBuilderExtension.cs b/src/NKZSoft.Template.Presentation.Rest/Extensions/ApplicationBuilderExtension.cs index 7333c74..6711326 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Extensions/ApplicationBuilderExtension.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Extensions/ApplicationBuilderExtension.cs @@ -1,5 +1,7 @@ namespace NKZSoft.Template.Presentation.Rest.Extensions; +using NKZSoft.Template.Common.Extensions; + public static class ApplicationBuilderExtension { public static IApplicationBuilder UseRestPresentation( diff --git a/src/NKZSoft.Template.Presentation.Rest/Extensions/ServiceCollectionExtension.cs b/src/NKZSoft.Template.Presentation.Rest/Extensions/ServiceCollectionExtension.cs index 9c20e33..908eeb4 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Extensions/ServiceCollectionExtension.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Extensions/ServiceCollectionExtension.cs @@ -14,7 +14,7 @@ public static IServiceCollection AddRestPresentation( services.AddCors(options => options.AddPolicy("CorsPolicy", builder => { - builder.WithOrigins(corsParams.ToArray()) + builder.WithOrigins([.. corsParams]) .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials(); diff --git a/src/NKZSoft.Template.Presentation.Rest/Filters/CustomExceptionFilterAttribute.cs b/src/NKZSoft.Template.Presentation.Rest/Filters/CustomExceptionFilterAttribute.cs index a80e8fa..5d0ec37 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Filters/CustomExceptionFilterAttribute.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Filters/CustomExceptionFilterAttribute.cs @@ -1,5 +1,7 @@ namespace NKZSoft.Template.Presentation.Rest.Filters; +using NKZSoft.Template.Common.Extensions; + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] public class CustomExceptionFilterAttribute : ExceptionFilterAttribute { diff --git a/src/NKZSoft.Template.Presentation.Rest/Middleware/ErrorHandlingMiddleware.cs b/src/NKZSoft.Template.Presentation.Rest/Middleware/ErrorHandlingMiddleware.cs index c94a858..ba69bf7 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Middleware/ErrorHandlingMiddleware.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Middleware/ErrorHandlingMiddleware.cs @@ -35,7 +35,7 @@ private static async Task HandleExceptionAsync(HttpContext context, const HttpStatusCode code = HttpStatusCode.InternalServerError; var resultDto = new ResultDtoBase(Unit.Value, IsSuccess:false, - Errors:new[] { new ErrorDto(exception.Message, code.ToString()) }); + Errors: [new ErrorDto(exception.Message, code.ToString()),]); var result = JsonSerializer.Serialize(resultDto); context.Response.ContentType = "application/json"; diff --git a/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoBase.cs b/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoBase.cs index 329c944..18360b0 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoBase.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoBase.cs @@ -11,7 +11,7 @@ public static ResultDtoBase CreateFromErrors(IList(Unit.Value, IsSuccess:false, listErrors.ToArray()); + return new ResultDtoBase(Unit.Value, IsSuccess:false, [.. listErrors]); } public static ResultDtoBase CreateFromErrors(string errors, HttpStatusCode statusCode) { @@ -19,7 +19,7 @@ public static ResultDtoBase CreateFromErrors(string errors, HttpStatusCode { new(errors, statusCode.ToString()), }; - return new ResultDtoBase(Unit.Value, IsSuccess:false, listErrors.ToArray()); + return new ResultDtoBase(Unit.Value, IsSuccess:false, [.. listErrors]); } } diff --git a/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoExtensions.cs b/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoExtensions.cs index e76b951..b3d8baa 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoExtensions.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoExtensions.cs @@ -12,10 +12,9 @@ private static IEnumerable TransformErrors(IEnumerable errors) private static string? TransformErrorCode(IReason error) { - if (error.Metadata?.TryGetValue("ErrorCode", out var errorCode) != null && errorCode != null) - { - return errorCode as string; - } - return null; + return error.Metadata?.TryGetValue("ErrorCode", out var errorCode) != null && + errorCode != null ? + errorCode as string : + null; } } diff --git a/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoHelpers.cs b/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoHelpers.cs index fbcbea0..0928cad 100644 --- a/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoHelpers.cs +++ b/src/NKZSoft.Template.Presentation.Rest/Models/Result/ResultDtoHelpers.cs @@ -6,8 +6,8 @@ public static ResultDtoBase CreateFromErrors(string errors, HttpStatusCode { var listErrors = new List(1) { - new ErrorDto(errors, statusCode.ToString()), + new(errors, statusCode.ToString()), }; - return new ResultDtoBase(Unit.Value, IsSuccess:false, listErrors.ToArray()); + return new ResultDtoBase(Unit.Value, IsSuccess:false, [.. listErrors]); } } diff --git a/src/NKZSoft.Template.Presentation.Starter/packages.lock.json b/src/NKZSoft.Template.Presentation.Starter/packages.lock.json index ec6b9e5..2d0c15c 100644 --- a/src/NKZSoft.Template.Presentation.Starter/packages.lock.json +++ b/src/NKZSoft.Template.Presentation.Starter/packages.lock.json @@ -184,8 +184,8 @@ }, "GreenDonut": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "WrJ767niVcKy5J8VFH+KsB1I36vFtjSVcvBOgsmaXjoZl/cGWumjdZT3PZfYPVmW2Q9RLplvfs/fjIXtiQGaGQ==", + "resolved": "14.1.0", + "contentHash": "Cd4T+et1y+Vp1MuD0rBpmoW7btwTIYVvW13YdMAjKBv3Uf8Z8/C/a/DBleD7ekrh758DlnZUfpyOCNrTFvpvkA==", "dependencies": { "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "Microsoft.Extensions.ObjectPool": "8.0.0" @@ -223,296 +223,296 @@ }, "HotChocolate": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "qYrY0IGWiFrPDwbb/yDmfzErLb1rBp8CGvvhQfB3DPAqjRRpe14KFEyurEJeV3kqXaw1UssHuc+TRA9PmvsCSQ==", + "resolved": "14.1.0", + "contentHash": "+vR9vxPnM2tiBN84Rai6JuPIwiB0XDrOFd688P0TTuW8Bg+b3sBTZnNSzH1HdCL0KjgzCVHQzfHItB9Qbe2gUg==", "dependencies": { - "HotChocolate.Authorization": "14.0.0", - "HotChocolate.CostAnalysis": "14.0.0", - "HotChocolate.Execution": "14.0.0", - "HotChocolate.Fetching": "14.0.0", - "HotChocolate.Pagination.Mappings": "14.0.0", - "HotChocolate.Types": "14.0.0", - "HotChocolate.Types.CursorPagination": "14.0.0", - "HotChocolate.Types.Mutations": "14.0.0", - "HotChocolate.Types.OffsetPagination": "14.0.0", - "HotChocolate.Types.Queries": "14.0.0", - "HotChocolate.Validation": "14.0.0" + "HotChocolate.Authorization": "14.1.0", + "HotChocolate.CostAnalysis": "14.1.0", + "HotChocolate.Execution": "14.1.0", + "HotChocolate.Fetching": "14.1.0", + "HotChocolate.Pagination.Mappings": "14.1.0", + "HotChocolate.Types": "14.1.0", + "HotChocolate.Types.CursorPagination": "14.1.0", + "HotChocolate.Types.Mutations": "14.1.0", + "HotChocolate.Types.OffsetPagination": "14.1.0", + "HotChocolate.Types.Queries": "14.1.0", + "HotChocolate.Validation": "14.1.0" } }, "HotChocolate.Authorization": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "dMFavY/DX+K+3hvHo6dzfmwxN13kIEiSQRDYfHiWbkKxvrT8aLy1B0wTLR4TmUQozjHdENp8Ap5iSo0qMHa9cA==", + "resolved": "14.1.0", + "contentHash": "HZn26aqhgpFBBPo1zVY4Fc9NJhqlVyNkuJ1J9CyWxHIGTkvovK/YoGWv2ApEEMaR0QEV3QpU9pqom1ro5VKG8Q==", "dependencies": { - "HotChocolate.Execution": "14.0.0" + "HotChocolate.Execution": "14.1.0" } }, "HotChocolate.CostAnalysis": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "zpTPXqIC21G9vzPjlGXPJ1lRePPCvaqeO7YKwpiDCapIL9GUfaOQ61XmHpDiPCD/SMf02jOl94UZMytdqZDQXw==", + "resolved": "14.1.0", + "contentHash": "7ZsxSfF7Kn/T63MzgODTwIjWa4JShD7gxxZKjPBNEX76JKgWZcL46nR29bmTYjaeDEklyGZMCH5zbDf7Vx0WUQ==", "dependencies": { - "HotChocolate.Execution": "14.0.0", - "HotChocolate.Types": "14.0.0" + "HotChocolate.Execution": "14.1.0", + "HotChocolate.Types": "14.1.0" } }, "HotChocolate.Execution": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "KQM6rKcBRYzOHa/GP1vBQ02jnkK5bqcmKujEPIp+qR4Kei9XuYJpQKexOEHImod+yxYHG0tNl2tltC4xKEcCbw==", - "dependencies": { - "HotChocolate.Abstractions": "14.0.0", - "HotChocolate.Execution.Abstractions": "14.0.0", - "HotChocolate.Fetching": "14.0.0", - "HotChocolate.Pagination.Batching": "14.0.0", - "HotChocolate.Types": "14.0.0", - "HotChocolate.Utilities.DependencyInjection": "14.0.0", - "HotChocolate.Validation": "14.0.0", + "resolved": "14.1.0", + "contentHash": "jW2jOWFy1864u48AbWVojM/LdJ/JV2RVPYUxFaDC2XHffHIRHlbkJpaXU7fa1UxEOpn1ikNioY+yTGPKS0zxdw==", + "dependencies": { + "HotChocolate.Abstractions": "14.1.0", + "HotChocolate.Execution.Abstractions": "14.1.0", + "HotChocolate.Fetching": "14.1.0", + "HotChocolate.Pagination.Batching": "14.1.0", + "HotChocolate.Types": "14.1.0", + "HotChocolate.Utilities.DependencyInjection": "14.1.0", + "HotChocolate.Validation": "14.1.0", "Microsoft.Extensions.DependencyInjection": "8.0.0", "System.IO.Pipelines": "8.0.0" } }, "HotChocolate.Execution.Abstractions": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "QQZ0ytEvpptE3PxWbgaL613xCHlAwq7kdMmjFdncLBZfLknRZxp+y/g6KVkC4CSo/BXgg17YrmvuMpw9NL7fyA==", + "resolved": "14.1.0", + "contentHash": "lFpJKz1sAvFHE8dPdn+8EZ4nGr+J8S8zoYcInBwrmcN06AgH/J4hj/y/DzGFeL5GM3iTrum6CxyNhtNScubicw==", "dependencies": { - "HotChocolate.Abstractions": "14.0.0", + "HotChocolate.Abstractions": "14.1.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, "HotChocolate.Features": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "5jiRHYLN4NR8KRqjifrFxUgyQ168qJADQduN9AY6jZYtfVF3nTnxqAV7MGhqyRjD3cDLGPUt6hdHpSC/H5/V/w==" + "resolved": "14.1.0", + "contentHash": "hyMnBcQPXcXBd+sey9nNuyCEDdBRD/0gajDAhVOVU7vr9vX7OTCzNkicDfeNoxUVsZzr7AKKiJyP9lDZnLHbUQ==" }, "HotChocolate.Fetching": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "vrLOJxLsow0DOxyjaG9aVDABKFeCHDqd4GoxBJBNkSmyCBydGLQTt6dEtSpOW84vmziF9od2jCo925sORw/z4A==", + "resolved": "14.1.0", + "contentHash": "Cp79JEgUyYCReuM8+tu+4IRRk3bp40jNclpllmS6YSrqzEFVq1NHePTAOtONuNACxFP0HO0gmdCTlqwgTpGvGw==", "dependencies": { - "GreenDonut": "14.0.0", - "HotChocolate.Types": "14.0.0" + "GreenDonut": "14.1.0", + "HotChocolate.Types": "14.1.0" } }, "HotChocolate.Language": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "OIEaDt4MTwvv0YysRe87EJ04Q6r6CvlCeJ847gi0tQhGcb527m+N49h3rldpBNMr4IB795WCcTU4NfT/IhvErg==", + "resolved": "14.1.0", + "contentHash": "+52RVLDDC1clzYx/z6dObErwwyPSRGqKnltY5C1szYOmu0Tr3AqSHV+qBlnCMXuUWg6nU0Rtt2sLZLG85DJImg==", "dependencies": { - "HotChocolate.Language.SyntaxTree": "14.0.0", - "HotChocolate.Language.Utf8": "14.0.0", - "HotChocolate.Language.Visitors": "14.0.0", - "HotChocolate.Language.Web": "14.0.0" + "HotChocolate.Language.SyntaxTree": "14.1.0", + "HotChocolate.Language.Utf8": "14.1.0", + "HotChocolate.Language.Visitors": "14.1.0", + "HotChocolate.Language.Web": "14.1.0" } }, "HotChocolate.Language.SyntaxTree": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "Q3znFO7whHpOLBCHdhKuuLPcPT/HuZ8Dkh+kKpKh4pRoGkQo5eQQSN+8sCgroN2CIbE65hCvd8Kh7PHuzhwfHw==", + "resolved": "14.1.0", + "contentHash": "49BtPMLGPK2zNQ9bVWxpHTBz1CCSFRXJYoWgbGjfEIfHIuErr7JRhtQd2t12g2zhB/8Is8gIBaaCdlqsWmDoLA==", "dependencies": { "Microsoft.Extensions.ObjectPool": "8.0.0" } }, "HotChocolate.Language.Utf8": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "Q/Ngjkw3xfCdBTreEQR4dUU7u6FaxE52IIUzEsWkJ+ibun3gP1E/we3NanbUDflhCd7bh37D6bktFSyhlYXyKQ==", + "resolved": "14.1.0", + "contentHash": "EMzUpIJXI/cawX+kY64PNpbomy7z7GmVCjiXkKhlNHU9Q2uLWhWIB3kF68lCt3JL1Gwp6Pqa8gjfaog6Dtastw==", "dependencies": { - "HotChocolate.Language.SyntaxTree": "14.0.0" + "HotChocolate.Language.SyntaxTree": "14.1.0" } }, "HotChocolate.Language.Visitors": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "a7ZwXdOaBz2tWFCVghWyilpO0b842DKmu+hGMH+6aYliRkD4AM7HgCcH2dpMOqAwJrOh5tREbNGCj7FGTCDskA==", + "resolved": "14.1.0", + "contentHash": "NfOVRdXQYlbX+bB4b1FGtp2g/dOWjKA7pOnMsYqQek0Zft22R+L7eedwIf+Ih66T596xFpkhE8SeEeYQU/KPsw==", "dependencies": { - "HotChocolate.Language.SyntaxTree": "14.0.0" + "HotChocolate.Language.SyntaxTree": "14.1.0" } }, "HotChocolate.Language.Web": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "K07Hp2qg/7E06zKLckbNr8Y7Pg2Cty1BcaCjAQyDy2VfLo3PAYW4kMCN5Pbq7o2aSNsBKY1fLNzWCYOO1s7N7g==", + "resolved": "14.1.0", + "contentHash": "lzC7IRAkkZ8um7QgzxmYt7j5nmOgDeKlqUDBSHEANPU1FIN79REvBfhn2MmSmKsDcoDjanTawWmSrUj00Y1dvw==", "dependencies": { - "HotChocolate.Language.Utf8": "14.0.0" + "HotChocolate.Language.Utf8": "14.1.0" } }, "HotChocolate.Pagination.Batching": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "mEwYcItpIZbJKhi6Yhhobq0Diykimmox81/+FS+hMIHq58PfnanWilqcGwfcnzC5HH9+Vtj+eaaa0aKuq2wUeg==", + "resolved": "14.1.0", + "contentHash": "9WYAvFKLJh2Qit2XbAEhFZjtZ926+839c9+Du20IROJ2ikxhMPFPg2xdy9t7tDaBlA3ZenFXPhdDbL5REFavHQ==", "dependencies": { - "GreenDonut": "14.0.0", - "HotChocolate.Pagination.Primitives": "14.0.0" + "GreenDonut": "14.1.0", + "HotChocolate.Pagination.Primitives": "14.1.0" } }, "HotChocolate.Pagination.Core": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "bTXX4w8hmaTL9ejnh0RW3B3fJDgxWSXPlx5KMcJlRT9XwT/wUzAEHLGVKLMj6HZNY7KgSdP1yZQjnU+wq4pw6Q==", + "resolved": "14.1.0", + "contentHash": "JyM++NtBYKcYEWCBDAA/OpQtOibSodIrVb7jTtYAysCt+1VW1IED1RCRSuL6bLPayR4+AaZv8rWtBHTlXTZexQ==", "dependencies": { - "HotChocolate.Pagination.Primitives": "14.0.0" + "HotChocolate.Pagination.Primitives": "14.1.0" } }, "HotChocolate.Pagination.EntityFramework": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "zRqOJYTcwQ/TDSI1aSrec5S8JsbnBoyeek7AaodkBYkEp25eobfTTQItFA6cw3E5ruu+dAdlRfKoSFxjUQfDYA==", + "resolved": "14.1.0", + "contentHash": "+jwR7WXOFPWKWvtCGIo8il3jvCKMQME0vyLDiKYy0YOOin0377rYLpcVhrt47SrEvcOmDBkQ1fKR10MPzAvdxw==", "dependencies": { - "HotChocolate.Pagination.Core": "14.0.0", - "HotChocolate.Pagination.Primitives": "14.0.0", + "HotChocolate.Pagination.Core": "14.1.0", + "HotChocolate.Pagination.Primitives": "14.1.0", "Microsoft.EntityFrameworkCore": "8.0.0" } }, "HotChocolate.Pagination.Mappings": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "fUa4DYd2HChHzQJJHViG94mnYhzhK0q+hfmhuaLqRPImipTNDISBbv3bIxp5SNSEPg15on64XZPNEW1eGdmxRw==", + "resolved": "14.1.0", + "contentHash": "x+rH80sNI22hqZ1V/E0oFprOGRdAK7v7/95fQ6pNMJkgxiGRdVXjHvs0CCMqlsz4UoZFSOnF/rlMtq3rArkKJQ==", "dependencies": { - "HotChocolate.Execution.Abstractions": "14.0.0", - "HotChocolate.Pagination.Core": "14.0.0", - "HotChocolate.Pagination.Primitives": "14.0.0", - "HotChocolate.Types": "14.0.0", - "HotChocolate.Types.CursorPagination": "14.0.0" + "HotChocolate.Execution.Abstractions": "14.1.0", + "HotChocolate.Pagination.Core": "14.1.0", + "HotChocolate.Pagination.Primitives": "14.1.0", + "HotChocolate.Types": "14.1.0", + "HotChocolate.Types.CursorPagination": "14.1.0" } }, "HotChocolate.Pagination.Primitives": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "zgUuo652knMPiPg6wG/KacEAKleYtBh1cpHy8mxERKkzUUN0xvdiCZ/oedGc3gEAO+F4Dm/LZyR9GM8d+/j3Qw==" + "resolved": "14.1.0", + "contentHash": "3uraMoaEyhL/ETrwBp2fHf2qG/nch5lKpkzWfJV7xPq6smd2yZBErC4CJ+4XAoUsbqmENPG3EVT1OFRoQNcQxA==" }, "HotChocolate.Primitives": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "Xl4kERlFMb1rb+6wv70VIqBoKk2haBTD7psYhruo3Vvadjx/7556DBkdp8F/Qejrg0nMNRqU50WZxjIJYNZqJQ==", + "resolved": "14.1.0", + "contentHash": "Ne69B0/+kQVJN2SJuYJy6yfCcqXXcreM84EcMZ2OXI1GjPfzhbCzQ6yQ0t9l9TzhLq6nt5k1CP0ckSw3l1gIPw==", "dependencies": { - "HotChocolate.Language": "14.0.0" + "HotChocolate.Language": "14.1.0" } }, "HotChocolate.Subscriptions": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "87OSL4ypkItJmmTFeaZsBkAwx2sPlRyco7qVBE3Ql8iiRwo2rU231vldNr6X7g8IJfKl7Jy8tH6HGWgElaJdqw==", + "resolved": "14.1.0", + "contentHash": "crmRHuaJ/M66xZOS+Dd2CYsFfu+H/fGRjzC1t1uMrDTb7KDY/2Akjp4fCJMDTjjdd/c5I4PndGJxBNTOG8FlLg==", "dependencies": { - "HotChocolate.Abstractions": "14.0.0", - "HotChocolate.Execution.Abstractions": "14.0.0" + "HotChocolate.Abstractions": "14.1.0", + "HotChocolate.Execution.Abstractions": "14.1.0" } }, "HotChocolate.Subscriptions.InMemory": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "+6BdotuOTiCJXBTu22BhWRvoHqSCGNdOyk0xvBW2C5kvxas+ICGfP0cSy3Ej/rJOO5cu1dCvfvNhW0kNNFWtKA==", + "resolved": "14.1.0", + "contentHash": "o95Rall66neTv4AJaEyXBkqWuYO0J74uvO0bI7vVzh6AN9htDTw8LbwVwYanQHYCzy2U5+7c9KuzVfS0XpCibA==", "dependencies": { - "HotChocolate.Execution.Abstractions": "14.0.0", - "HotChocolate.Subscriptions": "14.0.0", + "HotChocolate.Execution.Abstractions": "14.1.0", + "HotChocolate.Subscriptions": "14.1.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, "HotChocolate.Transport.Sockets": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "LJp9OpZYSf3hL+evNIoQmOh7Q6OXn8iggi4TL4ucBmDBvs3X0vJmS6BdFiPN6y8DJIu4L+8cG26QcNtHiidxzw==", + "resolved": "14.1.0", + "contentHash": "5hE/0dxnFqbik7KFG5AgWOeKreD2EaKigZsPvmciWgroADsiezqsvOlfreJh+fSBuwNWS2iuZjIqWnv5P49rAg==", "dependencies": { "System.IO.Pipelines": "8.0.0" } }, "HotChocolate.Types": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "2OSHlKa8F3B/5usA58IPnjldXcLwsFvHZUC5zSa86w3T/+WxjJMy7kzSgg7sshodAqtJNom/7uKuJX7V6SBo2w==", + "resolved": "14.1.0", + "contentHash": "4k049YqqYb//xyGCSEV3qXfD9yWHFbl5tHK5S1loB+rhJ9QMrXRJGokgKDPETtAgxexPG8VZTrkmNKtM0cXYWg==", "dependencies": { - "GreenDonut": "14.0.0", - "HotChocolate.Abstractions": "14.0.0", - "HotChocolate.Features": "14.0.0", - "HotChocolate.Types.Shared": "14.0.0", - "HotChocolate.Utilities": "14.0.0", + "GreenDonut": "14.1.0", + "HotChocolate.Abstractions": "14.1.0", + "HotChocolate.Features": "14.1.0", + "HotChocolate.Types.Shared": "14.1.0", + "HotChocolate.Utilities": "14.1.0", "Microsoft.Extensions.DependencyInjection": "8.0.0", "Microsoft.Extensions.ObjectPool": "8.0.0" } }, "HotChocolate.Types.CursorPagination": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "P7KueIRu0Q3yGXngIi++Hlv4lrXD6T8v5y9dJK7Vr7M80eRHDRo4BGZjWJkzsBZ0bOoBr4fZdr2oaCSR1jJuiA==", + "resolved": "14.1.0", + "contentHash": "UlxGq0DleLEEmrZu8PeW0PfK1Y5u8aorqbXhuAjBJXhBLFBbXtcsGQmHv+ec8fX+L4YCZJiSheg9/BytjnqSxA==", "dependencies": { - "HotChocolate.Execution.Abstractions": "14.0.0", - "HotChocolate.Types": "14.0.0" + "HotChocolate.Execution.Abstractions": "14.1.0", + "HotChocolate.Types": "14.1.0" } }, "HotChocolate.Types.Errors": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "fJ/Ko0SbJLQ+3FgW1t5gpBIl/u/ZTM9dPYSXWk8UFU5x+W/AAdsC3ge5PgiQeqyLR7+vB9O8m+m9UqoPg0IgDA==", + "resolved": "14.1.0", + "contentHash": "sl09ERf53h1OnH5vHp2msvFzYo12jgLEijuakOTh0/YIOvXL3mPwS/8Bcn8MZT0ABXfLvQXq1pz7YYNyeVLMhw==", "dependencies": { - "HotChocolate.Execution": "14.0.0" + "HotChocolate.Execution": "14.1.0" } }, "HotChocolate.Types.Mutations": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "OBBRwwIJrvb+Z5pDuzP5aOFE8nScugoo2lTkf5S4Uvib6Fa7ELSK0IZFaojy1BtyzV1ExUjRhlxEfVPmu3Smaw==", + "resolved": "14.1.0", + "contentHash": "g0tZJvPj0kfY0hbfhk2K1KK1G0tn0IvZk5Gi+PaILTISv9GxeB0t0yy7f2SENrYc7VVuXW5ZRNOnVT6XXWWfmg==", "dependencies": { - "HotChocolate.Execution": "14.0.0", - "HotChocolate.Types.Errors": "14.0.0" + "HotChocolate.Execution": "14.1.0", + "HotChocolate.Types.Errors": "14.1.0" } }, "HotChocolate.Types.OffsetPagination": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "2fQylUoa5x13XBpDBkUp15NWVTPaM9mH3fz/SItOs/4mxZPUApVz6LlQu5xXJOIXZ3T8aiXQzDGcVRv0zB0n9w==", + "resolved": "14.1.0", + "contentHash": "JiGuhSeTOnO1f+npIgjHYtdH0B1M6zpBH+q1qpnsExGkpHUCeYifCeBFu2O2iIM3PEcpxuCXLLoMqjoEczfuuQ==", "dependencies": { - "HotChocolate.Execution": "14.0.0", - "HotChocolate.Types": "14.0.0" + "HotChocolate.Execution": "14.1.0", + "HotChocolate.Types": "14.1.0" } }, "HotChocolate.Types.Queries": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "YQBP8GmV4q2GplmpjqMnpVNK/2pNdKsaJDTZbtxU6IgCYbrwW4C1qhoreF0iARtFSlFa9ZPA3pbTSorc8QJf3Q==", + "resolved": "14.1.0", + "contentHash": "RAC+znWeBMsgjuRxuOVTRQzX3iu4TKyjaxinu0NRmnkNovFefxE/8f7uKYMGM0lg2g5v7+4vxhZkABTizOG/Eg==", "dependencies": { - "HotChocolate.Execution": "14.0.0", - "HotChocolate.Types.Errors": "14.0.0" + "HotChocolate.Execution": "14.1.0", + "HotChocolate.Types.Errors": "14.1.0" } }, "HotChocolate.Types.Scalars.Upload": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "zA87jRGrEbKc57ar2SxC0+MrNBJWvJGmO428ZELyiudJN8brSgX77DN6lTmuZua50jzsOP8ATrkfBZVp7Mp2qQ==", + "resolved": "14.1.0", + "contentHash": "dcpUWu51ZLopCOE4eiy0E/RwUBykiGuiLo/Sz5EPH47m7mgui2f1SK+3Iok0HidAc4wDpPzK7D8ru1aQYBWYVA==", "dependencies": { - "HotChocolate.Types": "14.0.0" + "HotChocolate.Types": "14.1.0" } }, "HotChocolate.Types.Shared": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "2NihqGoGzeykbSuy96C9Qpk8c7B2YzGY2mf7K+HugmU7DrPTsqB38RqspaQDLnuHyz1Utci+BdSTqPt7OYrSwQ==", + "resolved": "14.1.0", + "contentHash": "BUOjJT3VOIepOwoAWTExQlEVSZtwvB9afm9ok0breNTl1+HTmI4kSOvkL6RmUqAIfKHIdHFZ3g6nb7LPlmaQZQ==", "dependencies": { - "HotChocolate.Language.SyntaxTree": "14.0.0" + "HotChocolate.Language.SyntaxTree": "14.1.0" } }, "HotChocolate.Utilities": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "T7uhKdonbJwApM6cfmfg3h1iLI2RcXmViDTMBUNrv91ASWlOxY3OTmkPYHXBD+SPO9qgsONgUyXi6MR0n180rw==", + "resolved": "14.1.0", + "contentHash": "tcz5tfTqwo0W+Ck5a8qQmOwPmZ2ADwawhYKKPVj3jReuT3OgpAJLuH/SV39Fy0/2vHhQJ2YQTOgZGI7bBFDiRA==", "dependencies": { "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" } }, "HotChocolate.Utilities.DependencyInjection": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "M+fU65ZMLFMgUSbstHHDbnABeE3KzxBGjDU3f4vtyf5bNdRUIwMYHPsonF4vcNZu2YOB2HN0Zy+5VJdG5gnqMA==", + "resolved": "14.1.0", + "contentHash": "Gs39+tjU64V1NCkSGhIDAMErK+JKSILJWiWx8kWgzD91N8zrTNYBhTO97oFA2Nr9y4uTXmwiHVtUFt5zIp2kxA==", "dependencies": { "Microsoft.Extensions.DependencyInjection": "8.0.0" } }, "HotChocolate.Validation": { "type": "Transitive", - "resolved": "14.0.0", - "contentHash": "vFxVA2HMFyeSm7UURpZ2zVBnMgHt57dASLfCT46jqlE0iXRmpgALbwA/auzPYfPijPP6kHXBZ9KL7TmMAbRcew==", + "resolved": "14.1.0", + "contentHash": "mQMtXE8ggPfLWGnymNWS9TUWL7EnXshwwfJR5sdov8yBG4dN3SaekI6/RjUzRvZRcVVue0Wg/1mUc6vKLzZ/SQ==", "dependencies": { - "HotChocolate.Types": "14.0.0", + "HotChocolate.Types": "14.1.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", "Microsoft.Extensions.Options": "8.0.0" } @@ -1196,11 +1196,11 @@ }, "protobuf-net.Grpc.ClientFactory": { "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "sBbFXs16DgsUTkCIiDbVCayE/WTPTSW53tX/9iPk6V+hdXn/aIJI45Vqm25tODVoD8IhPIzbNuTJNeMhsPl9Pw==", + "resolved": "1.2.2", + "contentHash": "bX0FuDWPNz86FyMeKgruv345K+nQNe0Zgr0vALE+BB4ft4d0aB1sLcfWZ94aij8OXI3ldLaUFpqd+D6fjPV75g==", "dependencies": { - "Grpc.Net.ClientFactory": "2.51.0", - "protobuf-net.Grpc": "1.1.1" + "Grpc.Net.ClientFactory": "2.66.0", + "protobuf-net.Grpc": "1.2.2" } }, "protobuf-net.Grpc.Reflection": { @@ -2236,7 +2236,7 @@ "Microsoft.AspNetCore.Http.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging.Abstractions": "[8.0.2, )", "Testcontainers.PostgreSql": "[3.10.0, )", - "Testcontainers.RabbitMq": "[3.10.0, )", + "Testcontainers.RabbitMq": "[4.0.0, )", "Testcontainers.Redis": "[3.10.0, )" } }, @@ -2335,9 +2335,9 @@ "nkzsoft.template.presentation.graphql": { "type": "Project", "dependencies": { - "HotChocolate.AspNetCore": "[14.0.0, )", - "HotChocolate.Data": "[14.0.0, )", - "HotChocolate.Data.EntityFramework": "[14.0.0, )", + "HotChocolate.AspNetCore": "[14.1.0, )", + "HotChocolate.Data": "[14.1.0, )", + "HotChocolate.Data.EntityFramework": "[14.1.0, )", "HotChocolate.Diagnostics": "[14.0.0, )", "NKZSoft.Template.Application": "[1.0.0, )" } @@ -2346,7 +2346,7 @@ "type": "Project", "dependencies": { "Google.Protobuf": "[3.28.3, )", - "NKZSoft.Service.Configuration.Grpc": "[1.2.1, )", + "NKZSoft.Service.Configuration.Grpc": "[1.2.2, )", "NKZSoft.Template.Application": "[1.0.0, )", "OpenTelemetry": "[1.9.0, )", "OpenTelemetry.Instrumentation.GrpcNetClient": "[1.0.0-rc9.14, )", @@ -2526,47 +2526,47 @@ }, "HotChocolate.Abstractions": { "type": "CentralTransitive", - "requested": "[14.0.0, )", - "resolved": "14.0.0", - "contentHash": "vXdlfkNGxHnONfhUY7jCmXEgW4hGC8iMj1AHD5vHGbfWNUaTH/SmnuAEHnIcKi9SFUzVtk9VOGE4Mtl4Dy8cEg==", + "requested": "[14.1.0, )", + "resolved": "14.1.0", + "contentHash": "S714rAhAPKBub+y5lMPb1GSE+JNryotVmb/idCMVBSV03XEw8uxW5UHh+O0cKyYtkIbM3RQTnyyrLJ8EDHhk6w==", "dependencies": { - "HotChocolate.Primitives": "14.0.0" + "HotChocolate.Primitives": "14.1.0" } }, "HotChocolate.AspNetCore": { "type": "CentralTransitive", - "requested": "[14.0.0, )", - "resolved": "14.0.0", - "contentHash": "+nDoEzodYBmU7pcHEz4KR9tejHoFyEq90BiVIms6mYj90whDc5vI177Fq3tQogpVDGQYL6mFFXu6yxJNCrIx8Q==", + "requested": "[14.1.0, )", + "resolved": "14.1.0", + "contentHash": "nJ/It5vkX5NST/GXzVsYWIjTABGr0l+S+M6hPANcR2eulWAmf2ekDRMfzezzDHiu9kk1/gLMQFS7UzNzULEYmA==", "dependencies": { "ChilliCream.Nitro.App": "20.0.2", - "HotChocolate": "14.0.0", - "HotChocolate.Subscriptions.InMemory": "14.0.0", - "HotChocolate.Transport.Sockets": "14.0.0", - "HotChocolate.Types.Scalars.Upload": "14.0.0", - "HotChocolate.Utilities.DependencyInjection": "14.0.0" + "HotChocolate": "14.1.0", + "HotChocolate.Subscriptions.InMemory": "14.1.0", + "HotChocolate.Transport.Sockets": "14.1.0", + "HotChocolate.Types.Scalars.Upload": "14.1.0", + "HotChocolate.Utilities.DependencyInjection": "14.1.0" } }, "HotChocolate.Data": { "type": "CentralTransitive", - "requested": "[14.0.0, )", - "resolved": "14.0.0", - "contentHash": "VsceJrGuqncAJpGrkTVqjxJco4KvMKMAW6XFOSKQJhOR0apSY0GFwAPkGgEczv1NQm+VPWmZUWlBP694YKt6kA==", + "requested": "[14.1.0, )", + "resolved": "14.1.0", + "contentHash": "jarvbXI+VUgo1rMNgVK/0h7Zh7j8AoprIzlGXOdci1xdKKPtWKdcZC4D91BvwEY+VUzU9gRWb+vdnYWwP8dgzA==", "dependencies": { - "HotChocolate.Execution": "14.0.0", - "HotChocolate.Pagination.Batching": "14.0.0", - "HotChocolate.Types.CursorPagination": "14.0.0" + "HotChocolate.Execution": "14.1.0", + "HotChocolate.Pagination.Batching": "14.1.0", + "HotChocolate.Types.CursorPagination": "14.1.0" } }, "HotChocolate.Data.EntityFramework": { "type": "CentralTransitive", - "requested": "[14.0.0, )", - "resolved": "14.0.0", - "contentHash": "vAFvTzNiIaSn/OoaACiXfLRBaOxU4xFCmUqfzdlbZlhOw1c8N1Nrjgf8S6ZFkziQfq8UBXWI1xNcy338bl8LwA==", + "requested": "[14.1.0, )", + "resolved": "14.1.0", + "contentHash": "PAIafB8YkhB3rKlz8fKfPKjpaSOKlwrkHgnvvSsUymFaK4fmgNet9K2e3OdXjClRLsX9GNLZ8cUEZMfQhItT1g==", "dependencies": { - "HotChocolate": "14.0.0", - "HotChocolate.Data": "14.0.0", - "HotChocolate.Pagination.EntityFramework": "14.0.0", + "HotChocolate": "14.1.0", + "HotChocolate.Data": "14.1.0", + "HotChocolate.Pagination.EntityFramework": "14.1.0", "Microsoft.EntityFrameworkCore": "8.0.0" } }, @@ -2816,18 +2816,18 @@ }, "NKZSoft.Service.Configuration.Grpc": { "type": "CentralTransitive", - "requested": "[1.2.1, )", - "resolved": "1.2.1", - "contentHash": "c1f034R53JOFbt//P9moRD09Y+SzAwUcw4wnwYbhFYvBJLqnLEzB1YfUAhhOsA4IaajkklA3GIwl9SyORKxtxg==", + "requested": "[1.2.2, )", + "resolved": "1.2.2", + "contentHash": "hO23EC0kj/aOY+6FacfJPMUfRGKMG/MOtY13laT3k9ZP/abNGGmTG5bG84/RdxZKhQkuO6ZcBQq7kwMXhCTjfg==", "dependencies": { "Grpc.Core.Api": "2.66.0", "Grpc.Net.ClientFactory": "2.66.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2", "protobuf-net": "3.2.30", - "protobuf-net.Grpc": "1.1.1", - "protobuf-net.Grpc.AspNetCore": "1.1.1", - "protobuf-net.Grpc.AspNetCore.Reflection": "1.1.1", - "protobuf-net.Grpc.ClientFactory": "1.1.1" + "protobuf-net.Grpc": "1.2.2", + "protobuf-net.Grpc.AspNetCore": "1.2.2", + "protobuf-net.Grpc.AspNetCore.Reflection": "1.2.2", + "protobuf-net.Grpc.ClientFactory": "1.2.2" } }, "NKZSoft.Service.Configuration.Logger": { @@ -3035,9 +3035,9 @@ }, "Testcontainers": { "type": "CentralTransitive", - "requested": "[3.10.0, )", - "resolved": "3.10.0", - "contentHash": "4oFyiUPCOM3s/sKDnIcOJZIn664d/8+fPvODDlfbb0QAfQqHlqjc2kIoFOLAt3oJRZP9/FJtTvcNvp9j7h4UBA==", + "requested": "[4.0.0, )", + "resolved": "4.0.0", + "contentHash": "wLG4Ls/A4jNB7b2ZrhtCUCHFBinDXohgvZ54fJB+kLVkxrqSuyQHdKwlIwPLgLSVGfPaMIAkZOEFVDSoEa1VxA==", "dependencies": { "Docker.DotNet": "3.125.15", "Docker.DotNet.X509": "3.125.15", @@ -3057,11 +3057,11 @@ }, "Testcontainers.RabbitMq": { "type": "CentralTransitive", - "requested": "[3.10.0, )", - "resolved": "3.10.0", - "contentHash": "ih6Pbx68k4Q4qxJQWB5pRIidiXLHhY970N/CDXe1vKYUn9gkz1ZzJe4cTeqHdHKEYmrsNtWlB0u52sawMlKeBw==", + "requested": "[4.0.0, )", + "resolved": "4.0.0", + "contentHash": "8x0kkzpLRTYLbQq3gQ4jwX62SfhSaeZQn89U33W3vkux536joayDrfLiF19hJYI4wEbytEMV2+Lal1TgQCY+Eg==", "dependencies": { - "Testcontainers": "3.10.0" + "Testcontainers": "4.0.0" } }, "Testcontainers.Redis": { diff --git a/tests/NKZSoft.Template.Application.Tests/Common/QueryTestFixture.cs b/tests/NKZSoft.Template.Application.Tests/Common/QueryTestFixture.cs index 8620c68..36feb53 100644 --- a/tests/NKZSoft.Template.Application.Tests/Common/QueryTestFixture.cs +++ b/tests/NKZSoft.Template.Application.Tests/Common/QueryTestFixture.cs @@ -1,7 +1,7 @@ namespace NKZSoft.Template.Application.Tests.Common; using NKZSoft.Template.Application.Common.Interfaces; using SeedData; -using NKZSoft.Template.Common; +using NKZSoft.Template.Common.Extensions; public sealed class QueryTestFixture : IDisposable { diff --git a/tests/NKZSoft.Template.Common.Tests/AppMockFactory.cs b/tests/NKZSoft.Template.Common.Tests/AppMockFactory.cs index a6dc9a2..c915270 100644 --- a/tests/NKZSoft.Template.Common.Tests/AppMockFactory.cs +++ b/tests/NKZSoft.Template.Common.Tests/AppMockFactory.cs @@ -2,9 +2,9 @@ public static class AppMockFactory { - private static readonly Lazy MockRepository = new Lazy(() => new MockRepository(MockBehavior.Default)); + private static readonly Lazy _mockRepository = new(() => new MockRepository(MockBehavior.Default)); - private static MockRepository MockRepositoryInstance => MockRepository.Value; + private static MockRepository MockRepositoryInstance => _mockRepository.Value; public static ICurrentUserService CreateCurrentUserServiceMock() { diff --git a/tests/NKZSoft.Template.Common.Tests/BaseWebApplicationFactory.cs b/tests/NKZSoft.Template.Common.Tests/BaseWebApplicationFactory.cs index 1cd135a..cb495fd 100644 --- a/tests/NKZSoft.Template.Common.Tests/BaseWebApplicationFactory.cs +++ b/tests/NKZSoft.Template.Common.Tests/BaseWebApplicationFactory.cs @@ -54,11 +54,8 @@ await Task.WhenAll(Containers.Select(pair => pair.Value.DisposeAsync().AsTask()) protected T GetContainer() where T : class { - if (!Containers.TryGetValue(typeof(T), out var container)) - { - throw new NotSupportedException($"Couldn't find any container of {nameof(T)}"); - } - - return (container as T)!; + return !Containers.TryGetValue(typeof(T), out var container) ? + throw new NotSupportedException($"Couldn't find any container of {nameof(T)}") : + (container as T)!; } } diff --git a/tests/NKZSoft.Template.Presentation.Grpc.Tests/Services/ToDoItemServiceTests.cs b/tests/NKZSoft.Template.Presentation.Grpc.Tests/Services/ToDoItemServiceTests.cs index 504694f..a30036c 100644 --- a/tests/NKZSoft.Template.Presentation.Grpc.Tests/Services/ToDoItemServiceTests.cs +++ b/tests/NKZSoft.Template.Presentation.Grpc.Tests/Services/ToDoItemServiceTests.cs @@ -57,10 +57,13 @@ public async Task GetItemByNoIdTestAsync() { await Assert.ThrowsAsync(ActAsync); - async Task ActAsync() => await _service.GetToDoItemByIdAsync(new GetTodoItemRequest + async Task ActAsync() { - Id = Guid.NewGuid(), - }).ConfigureAwait(false); + await _service.GetToDoItemByIdAsync(new GetTodoItemRequest + { + Id = Guid.NewGuid(), + }).ConfigureAwait(false); + } } [Fact, Order(4)]