fix(01-08): register ProfileRepository and SettingsRepository in DI container
This commit is contained in:
@@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging;
|
|||||||
using Serilog;
|
using Serilog;
|
||||||
using SharepointToolbox.Infrastructure.Auth;
|
using SharepointToolbox.Infrastructure.Auth;
|
||||||
using SharepointToolbox.Infrastructure.Logging;
|
using SharepointToolbox.Infrastructure.Logging;
|
||||||
|
using SharepointToolbox.Infrastructure.Persistence;
|
||||||
using SharepointToolbox.Services;
|
using SharepointToolbox.Services;
|
||||||
using SharepointToolbox.ViewModels;
|
using SharepointToolbox.ViewModels;
|
||||||
using SharepointToolbox.ViewModels.Tabs;
|
using SharepointToolbox.ViewModels.Tabs;
|
||||||
@@ -69,6 +70,8 @@ public partial class App : Application
|
|||||||
|
|
||||||
private static void RegisterServices(HostBuilderContext ctx, IServiceCollection services)
|
private static void RegisterServices(HostBuilderContext ctx, IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
services.AddSingleton<ProfileRepository>();
|
||||||
|
services.AddSingleton<SettingsRepository>();
|
||||||
services.AddSingleton<MsalClientFactory>();
|
services.AddSingleton<MsalClientFactory>();
|
||||||
services.AddSingleton<SessionManager>();
|
services.AddSingleton<SessionManager>();
|
||||||
services.AddSingleton<ProfileService>();
|
services.AddSingleton<ProfileService>();
|
||||||
|
|||||||
Reference in New Issue
Block a user