Rimosso vocabolario da IOC(non serve...) + cleanup generale IOC e SPEC per pulizia

This commit is contained in:
Samuele Locatelli
2026-05-29 08:40:22 +02:00
parent 75e91dbc79
commit 582004c605
38 changed files with 67 additions and 1400 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -6
View File
@@ -15,7 +15,7 @@ using static EgwCoreLib.Utils.DtUtils;
namespace MP.Data.Controllers
{
public class MpSpecController : IDisposable
public class MpSpecController
{
#region Public Constructors
@@ -734,11 +734,6 @@ namespace MP.Data.Controllers
return dbResult;
}
public void Dispose()
{
_configuration = null;
}
/// <summary>
/// Eliminazione di un dossier
/// </summary>
-6
View File
@@ -254,12 +254,6 @@ namespace MP.Data.Services
{
if (!_disposed)
{
if (disposing)
{
// Free managed resources here
dbController.Dispose();
}
// Free unmanaged resources here
_disposed = true;
}
-6
View File
@@ -131,12 +131,6 @@ namespace MP.Data.Services
{
if (!_disposed)
{
if (disposing)
{
// Free managed resources here
dbController.Dispose();
}
// Free unmanaged resources here
_disposed = true;
}
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.INVE</RootNamespace>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOINVE </i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Land</RootNamespace>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo Tablet MAPO - DotNet6</i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.MON</RootNamespace>
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.MON.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Prog</RootNamespace>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.RIOC</RootNamespace>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-RIOC </i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
-1
View File
@@ -541,7 +541,6 @@ namespace MP.SPEC.Data
public void Dispose()
{
// Clear database controller
dbController.Dispose();
mongoController.Dispose();
redisConn.Dispose();
}
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>8.16.2605.2907</Version>
<Version>8.16.2605.2908</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 8.16.2605.2907</h4>
<h4>Versione: 8.16.2605.2908</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2907
8.16.2605.2908
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2907</version>
<version>8.16.2605.2908</version>
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+33 -2
View File
@@ -36,9 +36,28 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa
- Analisi di `MpDataService.cs` effettuata.
- Identificati i metodi con caching manuale (Redis/DB) e quelli già migrati a `GetOrFetchAsync`.
# Piano di Refactoring: Migrazione a FusionCache in `MpDataService.cs`
Stiamo lavorando sul progetto MP-SPEC.sln, dentro la cartella MP-SPEC (ed i progetti da cui dipende).
Voglio ottimizzare il file Data\MpDataService.cs
## Obiettivo
Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCache` per implementare un approccio multi-layer (Memory + Redis + DB), standardizzando l'accesso ai dati.
## Strategia di Migrazione
- **Metodo Standard**: `GetOrFetchAsync<T>(string operationName, string cacheKey, Func<Task<T>> fetchFunc, TimeSpan expiration, params string[] tagList)`.
- **Invalidazione**: Utilizzare i tag tramite `FlushCacheByTagsAsync`.
## Stato Avanzamento
### Fase 1: Analisi e Mapping (Completata)
- Analisi di `MpDataService.cs` effettuata.
- Identificati i metodi con caching manuale (Redis/DB) e quelli già migrati a `GetOrFetchAsync`.
### Fase 2: Refactoring Metodi di Lettura (Cache-aside) (In corso)
#### ✅ Metodi Migrati (Usano già `GetOrFetchAsync`)
#### ✅ Metodi Migrati (Usano già `GetOrFetchAsync` o `FusionCache.GetOrSet`)
- `AnagEventiGeneralAsync`
- `AnagStatiCommAsync`
- `AnagTipoArtLvAsync`
@@ -70,6 +89,7 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa
- `StatoMacchinaAsync`
- `TksScoreAsync`
- `WipKitFiltAsync`
- `Traduci` (Migrato con `GetOrSet` su dizionario lingua)
#### 🛠️ Metodi da Migrare (Usano ancora Redis/DB manuale)
- [ ] Migrazione di `ActionGetReq` (linea 110: usa `redisDb.StringGetAsync`).
@@ -88,7 +108,18 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa
- [ ] Migrazione di `POdlListByKitParent` (linea 1863: usa `redisDb.StringGet` e `StringSet`).
- [ ] Migrazione di `ProcFLStats` (linea 1992: usa `redisDb.StringSet`).
- [ ] Migrazione di `RecDbMaintStat` (linea 2451: usa `redisDb.StringSet`).
- [ ] Migrazione di `VocabolarioGetAll` (linea 2278: usa `redisDb.StringGet` e `StringSet`).
*(Nota: Il vecchio metodo `VocabolarioGetAll` e la gestione manuale del dizionario sono stati rimossi in favore di `Traduci` con FusionCache).*
### Fase 4: Verifica
- [ ] Verificare la compilazione della soluzione tramite script PowerShell.
- [ ] Controllare che i log (NLog) continuano a riflettere correttamente le operazioni.
## Rischi e Mitigazioni
- **Rischio**: Discrepanza nelle chiavi di cache tra vecchio e nuovo sistema.
- *Mitigazione*: Utilizzare rigorosamente le costanti in `Utils.redis...` per garantire che le chiavi siano identiche o gestite dal nuovo sistema.
- **Rischio**: Errori di serializzazione.
- *Mitigazione*: `FusionCache` gestisce la serializzazione, ma è necessario assicurarsi che i tipi di ritorno siano compatibili con le aspettative dei chiamanti.
### Fase 4: Verifica
- [ ] Verificare la compilazione della soluzione tramite script PowerShell.