OF-DL/OF DL.Gui/Services/ServiceCollectionFactory.cs

30 lines
1.0 KiB
C#

using Microsoft.Extensions.DependencyInjection;
using OF_DL.Gui.ViewModels;
using OF_DL.Gui.Views;
using OF_DL.Services;
namespace OF_DL.Gui.Services;
internal static class ServiceCollectionFactory
{
public static IServiceCollection Create()
{
IServiceCollection services = new ServiceCollection();
services.AddSingleton<ILoggingService, LoggingService>();
services.AddSingleton<IConfigService, ConfigService>();
services.AddSingleton<IAuthService, AuthService>();
services.AddSingleton<IApiService, ApiService>();
services.AddSingleton<IDbService, DbService>();
services.AddSingleton<IDownloadService, DownloadService>();
services.AddSingleton<IFileNameService, FileNameService>();
services.AddSingleton<IStartupService, StartupService>();
services.AddSingleton<IDownloadOrchestrationService, DownloadOrchestrationService>();
services.AddSingleton<MainWindowViewModel>();
services.AddSingleton<MainWindow>();
return services;
}
}