From 913b009e90bc1747953e30fad4ed4ab19351b548 Mon Sep 17 00:00:00 2001 From: matthewtoghill <63318725+matthewtoghill@users.noreply.github.com> Date: Thu, 16 Feb 2023 19:59:08 +0000 Subject: [PATCH] CHORE: Update packages (#38) including update MediatR to v12 and resolve minor breaking change. --- .../Monaco.Template.Backend.Api.csproj | 8 ++++---- .../Solution/Monaco.Template.Backend.Api/Program.cs | 4 +--- .../DependencyInjection/ServiceCollectionExtensions.cs | 5 ++--- .../Monaco.Template.Backend.Application.csproj | 5 ++--- .../Monaco.Template.Backend.Common.Api.Application.csproj | 2 +- .../Monaco.Template.Backend.Common.Api.csproj | 6 +++--- .../Monaco.Template.Backend.Common.ApiGateway.csproj | 4 ++-- .../Monaco.Template.Backend.Common.Application.csproj | 2 +- .../Monaco.Template.Backend.Common.BlobStorage.csproj | 2 +- .../Monaco.Template.Backend.Common.Domain.Tests.csproj | 2 +- .../Monaco.Template.Backend.Common.Domain.csproj | 2 +- .../Monaco.Template.Backend.Common.Infrastructure.csproj | 8 ++++---- .../Monaco.Template.Backend.Common.Tests.csproj | 2 +- src/Monaco.Template.nuspec | 2 +- 14 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Monaco.Template.Backend.Api.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Monaco.Template.Backend.Api.csproj index 7ccc1a6..36e3c8c 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Monaco.Template.Backend.Api.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Monaco.Template.Backend.Api.csproj @@ -10,14 +10,14 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Program.cs b/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Program.cs index f52a4ec..13ce86a 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Program.cs +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Api/Program.cs @@ -3,8 +3,6 @@ #endif using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Mvc; -#if (!disableAuth) -#endif using Monaco.Template.Backend.Application.DependencyInjection; using Monaco.Template.Backend.Application.Infrastructure.Context; using Monaco.Template.Backend.Api.Auth; @@ -23,7 +21,7 @@ var builder = WebApplication.CreateBuilder(args); builder.Logging.ClearProviders(); builder.Host.UseSerilog((context, config) => config.ReadFrom.Configuration(context.Configuration) - .WriteTo.Logger(l => l.WriteTo.Conditional(_ => context.HostingEnvironment.IsDevelopment(), //Only for dev + .WriteTo.Logger(l => l.WriteTo.Conditional(_ => context.HostingEnvironment.IsDevelopment(), // Only for dev cfg => cfg.Debug() .WriteTo.File("logs/log.txt", rollingInterval: RollingInterval.Day, diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Application/DependencyInjection/ServiceCollectionExtensions.cs b/src/Content/Backend/Solution/Monaco.Template.Backend.Application/DependencyInjection/ServiceCollectionExtensions.cs index b02985d..0354113 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Application/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Application/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,5 +1,4 @@ using FluentValidation; -using MediatR; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Monaco.Template.Backend.Application.Infrastructure.Context; @@ -21,7 +20,7 @@ namespace Monaco.Template.Backend.Application.DependencyInjection; public static class ServiceCollectionExtensions { /// - /// Registers and configures all the services and dependencies of the Application + /// Registers and configures all the services and dependencies of the Application /// /// /// @@ -32,7 +31,7 @@ public static IServiceCollection ConfigureApplication(this IServiceCollection se var optionsValue = new ApplicationOptions(); options.Invoke(optionsValue); services.AddPolicies() - .AddMediatR(GetApplicationAssembly()) + .AddMediatR(config => config.RegisterServicesFromAssemblies(GetApplicationAssembly())) .RegisterCommandConcurrencyExceptionBehaviors(GetApplicationAssembly()) .RegisterCommandValidationBehaviors(GetApplicationAssembly()) .AddValidatorsFromAssembly(GetApplicationAssembly(), filter: filter => !filter.ValidatorType diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Application/Monaco.Template.Backend.Application.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Application/Monaco.Template.Backend.Application.csproj index c3b8a68..43ba611 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Application/Monaco.Template.Backend.Application.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Application/Monaco.Template.Backend.Application.csproj @@ -15,11 +15,10 @@ - + - + - diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api.Application/Monaco.Template.Backend.Common.Api.Application.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api.Application/Monaco.Template.Backend.Common.Api.Application.csproj index faecf4c..9c56153 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api.Application/Monaco.Template.Backend.Common.Api.Application.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api.Application/Monaco.Template.Backend.Common.Api.Application.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api/Monaco.Template.Backend.Common.Api.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api/Monaco.Template.Backend.Common.Api.csproj index 9f92fbd..bb9f78a 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api/Monaco.Template.Backend.Common.Api.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Api/Monaco.Template.Backend.Common.Api.csproj @@ -19,12 +19,12 @@ - + - + - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.ApiGateway/Monaco.Template.Backend.Common.ApiGateway.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.ApiGateway/Monaco.Template.Backend.Common.ApiGateway.csproj index 934a5b7..629a1d6 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.ApiGateway/Monaco.Template.Backend.Common.ApiGateway.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.ApiGateway/Monaco.Template.Backend.Common.ApiGateway.csproj @@ -8,12 +8,12 @@ - + - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Application/Monaco.Template.Backend.Common.Application.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Application/Monaco.Template.Backend.Common.Application.csproj index 64bb18c..bc5a3fd 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Application/Monaco.Template.Backend.Common.Application.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Application/Monaco.Template.Backend.Common.Application.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.BlobStorage/Monaco.Template.Backend.Common.BlobStorage.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.BlobStorage/Monaco.Template.Backend.Common.BlobStorage.csproj index 5ceda0a..2e50374 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.BlobStorage/Monaco.Template.Backend.Common.BlobStorage.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.BlobStorage/Monaco.Template.Backend.Common.BlobStorage.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain.Tests/Monaco.Template.Backend.Common.Domain.Tests.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain.Tests/Monaco.Template.Backend.Common.Domain.Tests.csproj index 15879ae..7ecb5d3 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain.Tests/Monaco.Template.Backend.Common.Domain.Tests.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain.Tests/Monaco.Template.Backend.Common.Domain.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain/Monaco.Template.Backend.Common.Domain.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain/Monaco.Template.Backend.Common.Domain.csproj index 8f0526f..2546c40 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain/Monaco.Template.Backend.Common.Domain.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain/Monaco.Template.Backend.Common.Domain.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Infrastructure/Monaco.Template.Backend.Common.Infrastructure.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Infrastructure/Monaco.Template.Backend.Common.Infrastructure.csproj index bfe5680..85a7980 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Infrastructure/Monaco.Template.Backend.Common.Infrastructure.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Infrastructure/Monaco.Template.Backend.Common.Infrastructure.csproj @@ -27,13 +27,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Tests/Monaco.Template.Backend.Common.Tests.csproj b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Tests/Monaco.Template.Backend.Common.Tests.csproj index bc76b65..279f811 100644 --- a/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Tests/Monaco.Template.Backend.Common.Tests.csproj +++ b/src/Content/Backend/Solution/Monaco.Template.Backend.Common.Tests/Monaco.Template.Backend.Common.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Monaco.Template.nuspec b/src/Monaco.Template.nuspec index 1676943..6fd629c 100644 --- a/src/Monaco.Template.nuspec +++ b/src/Monaco.Template.nuspec @@ -2,7 +2,7 @@ Monaco.Template - 2.0.0 + 2.0.1 Monaco Template Templates for .NET projects