diff --git a/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs b/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs index 1dcd9d2..b31da41 100644 --- a/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs +++ b/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs @@ -44,12 +44,17 @@ public class ReportOrchestrator : IReportOrchestrator _dividendRenderer = dividendRenderer; } - public async Task GenerateReportAsync(string isin, bool showBranding = false, bool showDividend = false) + public async Task GenerateReportAsync(string isin, bool showBranding = false, bool showDividend = false, bool showNatixis = false) { // ── Cache check ──────────────────────────────────────────────── var dividendSuffix = showDividend ? ":dividend" : ""; - var baseCacheKey = showBranding ? $"{isin}:branded{dividendSuffix}" : $"{isin}{dividendSuffix}"; - var expiredCacheKey = showBranding ? $"{isin}:expired:branded{dividendSuffix}" : $"{isin}:expired{dividendSuffix}"; + var natixisSuffix = showNatixis ? ":natixis" : ""; + var baseCacheKey = showBranding + ? $"{isin}:branded{dividendSuffix}{natixisSuffix}" + : $"{isin}{dividendSuffix}{natixisSuffix}"; + var expiredCacheKey = showBranding + ? $"{isin}:expired:branded{dividendSuffix}{natixisSuffix}" + : $"{isin}:expired{dividendSuffix}{natixisSuffix}"; var cached = _cache.Get(baseCacheKey) ?? _cache.Get(expiredCacheKey); if (cached != null) @@ -68,6 +73,7 @@ public class ReportOrchestrator : IReportOrchestrator Scenario = await _dataService.GetScenarioAnalysisAsync(isin), ShowBranding = showBranding, ShowDividend = showDividend, + ShowNatixis = showNatixis, }; // ── 2. Determina il tipo di report ────────────────────────────