From d27fa0b6fa7a6c55bc4c76082b456fff7008b5b7 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Sun, 8 Mar 2026 17:08:53 +0000 Subject: [PATCH 1/3] Update NuGet dependencies to latest 2026.3.x versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgraded all internal/shared package references from 2026.2.x to 2026.3.x across the solution. Also updated NLog.Extensions.Logging, MediatR, and NUnit to their latest patch versions. No code changes—dependency updates only. --- .../MessagingService.BusinessLogic.csproj | 4 ++-- MessagingService.Client/MessagingService.Client.csproj | 4 ++-- .../MessagingService.EmailAggregate.Tests.csproj | 2 +- .../MessagingService.EmailMessage.DomainEvents.csproj | 4 ++-- .../MessagingService.EmailMessageAggregate.csproj | 4 ++-- .../MessagingService.IntegrationTesting.Helpers.csproj | 2 +- .../MessagingService.IntegrationTests.csproj | 10 +++++----- .../MessagingService.SMSMessage.DomainEvents.csproj | 2 +- .../MessagingService.SMSMessageAggregate.csproj | 2 +- MessagingService/MessagingService.csproj | 10 +++++----- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/MessagingService.BusinessLogic/MessagingService.BusinessLogic.csproj b/MessagingService.BusinessLogic/MessagingService.BusinessLogic.csproj index b48e14e..364e2fd 100644 --- a/MessagingService.BusinessLogic/MessagingService.BusinessLogic.csproj +++ b/MessagingService.BusinessLogic/MessagingService.BusinessLogic.csproj @@ -5,8 +5,8 @@ - - + + diff --git a/MessagingService.Client/MessagingService.Client.csproj b/MessagingService.Client/MessagingService.Client.csproj index 72efec6..ba49f2d 100644 --- a/MessagingService.Client/MessagingService.Client.csproj +++ b/MessagingService.Client/MessagingService.Client.csproj @@ -6,9 +6,9 @@ - + - + diff --git a/MessagingService.EmailAggregate.Tests/MessagingService.EmailAggregate.Tests.csproj b/MessagingService.EmailAggregate.Tests/MessagingService.EmailAggregate.Tests.csproj index 7b4d9ae..af7d75a 100644 --- a/MessagingService.EmailAggregate.Tests/MessagingService.EmailAggregate.Tests.csproj +++ b/MessagingService.EmailAggregate.Tests/MessagingService.EmailAggregate.Tests.csproj @@ -8,7 +8,7 @@ - + diff --git a/MessagingService.EmailMessage.DomainEvents/MessagingService.EmailMessage.DomainEvents.csproj b/MessagingService.EmailMessage.DomainEvents/MessagingService.EmailMessage.DomainEvents.csproj index 36e3b6c..37f7a6d 100644 --- a/MessagingService.EmailMessage.DomainEvents/MessagingService.EmailMessage.DomainEvents.csproj +++ b/MessagingService.EmailMessage.DomainEvents/MessagingService.EmailMessage.DomainEvents.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/MessagingService.EmailMessageAggregate/MessagingService.EmailMessageAggregate.csproj b/MessagingService.EmailMessageAggregate/MessagingService.EmailMessageAggregate.csproj index fae149a..af53454 100644 --- a/MessagingService.EmailMessageAggregate/MessagingService.EmailMessageAggregate.csproj +++ b/MessagingService.EmailMessageAggregate/MessagingService.EmailMessageAggregate.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/MessagingService.IntegrationTesting.Helpers/MessagingService.IntegrationTesting.Helpers.csproj b/MessagingService.IntegrationTesting.Helpers/MessagingService.IntegrationTesting.Helpers.csproj index b71ce30..e5bd871 100644 --- a/MessagingService.IntegrationTesting.Helpers/MessagingService.IntegrationTesting.Helpers.csproj +++ b/MessagingService.IntegrationTesting.Helpers/MessagingService.IntegrationTesting.Helpers.csproj @@ -7,7 +7,7 @@ - + diff --git a/MessagingService.IntegrationTests/MessagingService.IntegrationTests.csproj b/MessagingService.IntegrationTests/MessagingService.IntegrationTests.csproj index c39346c..e31cd00 100644 --- a/MessagingService.IntegrationTests/MessagingService.IntegrationTests.csproj +++ b/MessagingService.IntegrationTests/MessagingService.IntegrationTests.csproj @@ -6,17 +6,17 @@ - + - + - - - + + + all diff --git a/MessagingService.SMSMessage.DomainEvents/MessagingService.SMSMessage.DomainEvents.csproj b/MessagingService.SMSMessage.DomainEvents/MessagingService.SMSMessage.DomainEvents.csproj index 4fd81f9..18a32af 100644 --- a/MessagingService.SMSMessage.DomainEvents/MessagingService.SMSMessage.DomainEvents.csproj +++ b/MessagingService.SMSMessage.DomainEvents/MessagingService.SMSMessage.DomainEvents.csproj @@ -6,7 +6,7 @@ - + diff --git a/MessagingService.SMSMessageAggregate/MessagingService.SMSMessageAggregate.csproj b/MessagingService.SMSMessageAggregate/MessagingService.SMSMessageAggregate.csproj index dc5f1e0..369fa61 100644 --- a/MessagingService.SMSMessageAggregate/MessagingService.SMSMessageAggregate.csproj +++ b/MessagingService.SMSMessageAggregate/MessagingService.SMSMessageAggregate.csproj @@ -6,7 +6,7 @@ - + diff --git a/MessagingService/MessagingService.csproj b/MessagingService/MessagingService.csproj index ceb9050..d4fa809 100644 --- a/MessagingService/MessagingService.csproj +++ b/MessagingService/MessagingService.csproj @@ -18,13 +18,13 @@ - - + + - - - + + + From cddffbf20b0969305488ca9d318a41094f6634c0 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Sun, 8 Mar 2026 17:10:57 +0000 Subject: [PATCH 2/3] Consolidate request/response logging middleware Replaced separate AddRequestLogging and AddResponseLogging middleware calls with a single AddRequestResponseLogging call to streamline logging and improve maintainability. --- MessagingService/Startup.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MessagingService/Startup.cs b/MessagingService/Startup.cs index a2249e6..86861ae 100644 --- a/MessagingService/Startup.cs +++ b/MessagingService/Startup.cs @@ -88,8 +88,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF ConfigurationReader.Initialise(Startup.Configuration); app.UseMiddleware(); - app.AddRequestLogging(); - app.AddResponseLogging(); + app.AddRequestResponseLogging(); app.AddExceptionHandler(); app.UseRouting(); From 6955bb6ff64446a5d9f6dd9c76042110d49324e1 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Mon, 9 Mar 2026 09:16:23 +0000 Subject: [PATCH 3/3] Refactor MediatR handler registration in MediatorRegistry Replaced manual registration of request handlers with AddMediatR and RegisterServicesFromAssembly. This change streamlines handler registration by automatically scanning the assembly for all relevant handlers, reducing boilerplate and easing future maintenance. --- MessagingService/Bootstrapper/MediatorRegistry.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/MessagingService/Bootstrapper/MediatorRegistry.cs b/MessagingService/Bootstrapper/MediatorRegistry.cs index f6f9467..6696e16 100644 --- a/MessagingService/Bootstrapper/MediatorRegistry.cs +++ b/MessagingService/Bootstrapper/MediatorRegistry.cs @@ -3,28 +3,22 @@ namespace MessagingService.Bootstrapper; -using System; -using System.Diagnostics.CodeAnalysis; using BusinessLogic.RequestHandlers; using BusinessLogic.Requests; +using Google.Api; using Lamar; using MediatR; using Microsoft.Extensions.DependencyInjection; using Shared.General; +using System; +using System.Diagnostics.CodeAnalysis; [ExcludeFromCodeCoverage] public class MediatorRegistry : ServiceRegistry { public MediatorRegistry() { - this.AddTransient(); - this.AddSingleton>, MessagingRequestHandler>(); - this.AddSingleton>, MessagingRequestHandler>(); - this.AddSingleton, MessagingRequestHandler>(); - this.AddSingleton, MessagingRequestHandler>(); - this.AddSingleton, MessagingRequestHandler>(); - this.AddSingleton, MessagingRequestHandler>(); - + this.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(MessagingRequestHandler).Assembly)); this.AddSingleton>(container => (serviceName) => ConfigurationReader.GetBaseServerUri(serviceName).OriginalString); } } \ No newline at end of file