From 7a35db526e0d89e31d8038bda47530e27635e170 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Tue, 23 Dec 2025 09:40:16 +0000 Subject: [PATCH] tweak to client registration --- TransactionProcessing.MerchantPos/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TransactionProcessing.MerchantPos/Program.cs b/TransactionProcessing.MerchantPos/Program.cs index ad49f2e..5fe71f1 100644 --- a/TransactionProcessing.MerchantPos/Program.cs +++ b/TransactionProcessing.MerchantPos/Program.cs @@ -14,6 +14,7 @@ using TransactionProcessing.MerchantPos.Runtime; using TransactionProcessor.Client; using ILogger = Microsoft.Extensions.Logging.ILogger; +using ClientProxyBase; var logger = LogManager.Setup().LoadConfigurationFromFile("nlog.config").GetCurrentClassLogger(); try @@ -78,8 +79,9 @@ // Repos + services builder.Services.AddScoped(); builder.Services.AddScoped(); - builder.Services.AddSingleton(); - builder.Services.AddSingleton(); + builder.Services.AddHttpContextAccessor(); + builder.Services.RegisterHttpClient(); + builder.Services.RegisterHttpClient(); builder.Services.AddHttpClient(); builder.Services.AddScoped();