From f8441f933fe0d9c06e1de82c7b4186713e49cc3e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 23 Mar 2026 19:01:36 +0100 Subject: [PATCH] Move ImageCacheServices + fix vari in cascata --- EgwCoreLib.Lux.Data/DataServiceCollectionExtensions.cs | 2 ++ EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj | 1 + .../Services/{ => General}/IImageCacheService.cs | 2 +- .../Services/{ => General}/ImageCacheService.cs | 2 +- Lux.API/Controllers/FileController.cs | 1 + Lux.API/Controllers/GenericController.cs | 1 + Lux.API/Controllers/ImageController.cs | 2 +- Lux.API/Controllers/WindowController.cs | 1 + Lux.API/Program.cs | 1 - Lux.API/Services/ExternalMessageProcessor.cs | 3 +-- Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs | 1 + Lux.UI/Components/Compo/Item/SellingItemMan.razor.cs | 1 + Lux.UI/Components/Compo/Offer/AddFromTemplate.razor.cs | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 1 + Lux.UI/Components/Compo/OrderRowMan.razor.cs | 1 + Lux.UI/Components/Compo/Templates/TemplateRowList.razor.cs | 1 + Lux.UI/Components/Pages/Scratch.razor.cs | 2 +- Lux.UI/Program.cs | 1 - 18 files changed, 17 insertions(+), 9 deletions(-) rename EgwCoreLib.Lux.Data/Services/{ => General}/IImageCacheService.cs (99%) rename EgwCoreLib.Lux.Data/Services/{ => General}/ImageCacheService.cs (99%) diff --git a/EgwCoreLib.Lux.Data/DataServiceCollectionExtensions.cs b/EgwCoreLib.Lux.Data/DataServiceCollectionExtensions.cs index 8722207c..f84c28cc 100644 --- a/EgwCoreLib.Lux.Data/DataServiceCollectionExtensions.cs +++ b/EgwCoreLib.Lux.Data/DataServiceCollectionExtensions.cs @@ -9,6 +9,7 @@ using EgwCoreLib.Lux.Data.Repository.Utils; using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Lux.Data.Services.Config; using EgwCoreLib.Lux.Data.Services.Cost; +using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Items; using EgwCoreLib.Lux.Data.Services.Job; using EgwCoreLib.Lux.Data.Services.Production; @@ -99,6 +100,7 @@ namespace EgwCoreLib.Lux.Data // aggiunta servizi finali Singleton... //services.TryAddSingleton(); + services.AddSingleton(); return services; diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj index fed9128f..860c7ff1 100644 --- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj +++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj @@ -54,6 +54,7 @@ + diff --git a/EgwCoreLib.Lux.Data/Services/IImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/General/IImageCacheService.cs similarity index 99% rename from EgwCoreLib.Lux.Data/Services/IImageCacheService.cs rename to EgwCoreLib.Lux.Data/Services/General/IImageCacheService.cs index 5445fd85..bb1e6cef 100644 --- a/EgwCoreLib.Lux.Data/Services/IImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/General/IImageCacheService.cs @@ -1,7 +1,7 @@ using EgwMultiEngineManager.Data; using StackExchange.Redis; -namespace EgwCoreLib.Lux.Data.Services +namespace EgwCoreLib.Lux.Data.Services.General { /// /// Interfaccia per ImageCacheService - caching e publishing immagini via Redis diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/General/ImageCacheService.cs similarity index 99% rename from EgwCoreLib.Lux.Data/Services/ImageCacheService.cs rename to EgwCoreLib.Lux.Data/Services/General/ImageCacheService.cs index a6f0b435..e05f8c12 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/General/ImageCacheService.cs @@ -5,7 +5,7 @@ using NLog; using RestSharp; using StackExchange.Redis; -namespace EgwCoreLib.Lux.Data.Services +namespace EgwCoreLib.Lux.Data.Services.General { public class ImageCacheService : IImageCacheService { diff --git a/Lux.API/Controllers/FileController.cs b/Lux.API/Controllers/FileController.cs index b4633601..379ad7c0 100644 --- a/Lux.API/Controllers/FileController.cs +++ b/Lux.API/Controllers/FileController.cs @@ -1,4 +1,5 @@ using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Sales; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Mvc; diff --git a/Lux.API/Controllers/GenericController.cs b/Lux.API/Controllers/GenericController.cs index eeb917ed..8c213aa9 100644 --- a/Lux.API/Controllers/GenericController.cs +++ b/Lux.API/Controllers/GenericController.cs @@ -1,6 +1,7 @@ using Egw.Window.Data; using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Mvc; using NLog; diff --git a/Lux.API/Controllers/ImageController.cs b/Lux.API/Controllers/ImageController.cs index 3fc2b8fe..6cafcc26 100644 --- a/Lux.API/Controllers/ImageController.cs +++ b/Lux.API/Controllers/ImageController.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.StaticFiles; diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index 9eaff569..dcf321a8 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -1,5 +1,6 @@ using EgwCoreLib.Lux.Data.DbModel.Config; using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Mvc; using NLog; diff --git a/Lux.API/Program.cs b/Lux.API/Program.cs index 27f74534..04f3936a 100644 --- a/Lux.API/Program.cs +++ b/Lux.API/Program.cs @@ -157,7 +157,6 @@ builder.Services.AddDbContextFactory(options => builder.Services.AddLuxData(connectionString); // servizi Singleton (no DB) -builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); diff --git a/Lux.API/Services/ExternalMessageProcessor.cs b/Lux.API/Services/ExternalMessageProcessor.cs index d25a4a53..6bdef134 100644 --- a/Lux.API/Services/ExternalMessageProcessor.cs +++ b/Lux.API/Services/ExternalMessageProcessor.cs @@ -1,8 +1,7 @@ using EgwCoreLib.Lux.Core.RestPayload; -using EgwCoreLib.Lux.Data; using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using EgwMultiEngineManager.Data; -using Microsoft.EntityFrameworkCore.Query; using Newtonsoft.Json; using NLog; using StackExchange.Redis; diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs index 28366ffb..8bb42556 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs @@ -1,6 +1,7 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Sales; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; diff --git a/Lux.UI/Components/Compo/Item/SellingItemMan.razor.cs b/Lux.UI/Components/Compo/Item/SellingItemMan.razor.cs index ebcee080..dcbfb471 100644 --- a/Lux.UI/Components/Compo/Item/SellingItemMan.razor.cs +++ b/Lux.UI/Components/Compo/Item/SellingItemMan.razor.cs @@ -1,6 +1,7 @@ using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Items; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; diff --git a/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor.cs b/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor.cs index 89566912..0511391f 100644 --- a/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor.cs +++ b/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor.cs @@ -1,6 +1,6 @@ using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Data.DbModel.Catalog; -using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using Microsoft.AspNetCore.Components; namespace Lux.UI.Components.Compo.Offer diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 34aba0e2..36be6b20 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -8,6 +8,7 @@ using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Domains; using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Lux.Data.Services.Config; +using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Items; using EgwCoreLib.Lux.Data.Services.Sales; using EgwCoreLib.Lux.Data.Services.Utils; diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor.cs b/Lux.UI/Components/Compo/OrderRowMan.razor.cs index 1cd0ea60..c362da05 100644 --- a/Lux.UI/Components/Compo/OrderRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OrderRowMan.razor.cs @@ -9,6 +9,7 @@ using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Domains; using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Lux.Data.Services.Config; +using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Items; using EgwCoreLib.Lux.Data.Services.Production; using EgwCoreLib.Lux.Data.Services.Sales; diff --git a/Lux.UI/Components/Compo/Templates/TemplateRowList.razor.cs b/Lux.UI/Components/Compo/Templates/TemplateRowList.razor.cs index ecf6803f..4d40e9d4 100644 --- a/Lux.UI/Components/Compo/Templates/TemplateRowList.razor.cs +++ b/Lux.UI/Components/Compo/Templates/TemplateRowList.razor.cs @@ -6,6 +6,7 @@ using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Lux.Data.Services.Config; +using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Items; using EgwCoreLib.Lux.Data.Services.Utils; using Microsoft.AspNetCore.Components; diff --git a/Lux.UI/Components/Pages/Scratch.razor.cs b/Lux.UI/Components/Pages/Scratch.razor.cs index 5373e7d1..87f61e79 100644 --- a/Lux.UI/Components/Pages/Scratch.razor.cs +++ b/Lux.UI/Components/Pages/Scratch.razor.cs @@ -1,6 +1,6 @@ using EgwCoreLib.Lux.Core; -using EgwCoreLib.Lux.Data; using EgwCoreLib.Lux.Data.Services; +using EgwCoreLib.Lux.Data.Services.General; using Microsoft.AspNetCore.Components; namespace Lux.UI.Components.Pages diff --git a/Lux.UI/Program.cs b/Lux.UI/Program.cs index 8f53699a..d42a7b24 100644 --- a/Lux.UI/Program.cs +++ b/Lux.UI/Program.cs @@ -185,7 +185,6 @@ builder.Services.AddIdentityCore(options => options.SignIn.Requ builder.Services.AddSingleton, IdentityNoOpEmailSender>(); // Aggiunta servizi specifici -builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton();