feat(10-03): register Phase 10 services in DI container

- Add BrandingRepository as Singleton with branding.json path
- Add IBrandingService/BrandingService as Singleton
- Add IGraphUserDirectoryService/GraphUserDirectoryService as Transient
- 224 tests pass, 26 integration tests skipped (live Graph)
This commit is contained in:
Dev
2026-04-08 12:36:12 +02:00
parent 61d7ada945
commit 7e8e228155

View File

@@ -77,6 +77,12 @@ public partial class App : Application
"SharepointToolbox"); "SharepointToolbox");
services.AddSingleton(_ => new ProfileRepository(Path.Combine(appData, "profiles.json"))); services.AddSingleton(_ => new ProfileRepository(Path.Combine(appData, "profiles.json")));
services.AddSingleton(_ => new SettingsRepository(Path.Combine(appData, "settings.json"))); services.AddSingleton(_ => new SettingsRepository(Path.Combine(appData, "settings.json")));
// Phase 10: Branding Data Foundation
services.AddSingleton(_ => new BrandingRepository(Path.Combine(appData, "branding.json")));
services.AddSingleton<IBrandingService, BrandingService>();
services.AddTransient<IGraphUserDirectoryService, GraphUserDirectoryService>();
services.AddSingleton<MsalClientFactory>(); services.AddSingleton<MsalClientFactory>();
services.AddSingleton<SessionManager>(); services.AddSingleton<SessionManager>();
services.AddSingleton<ISessionManager>(sp => sp.GetRequiredService<SessionManager>()); services.AddSingleton<ISessionManager>(sp => sp.GetRequiredService<SessionManager>());