wabbajack/Wabbajack.Downloaders.GameFile/ServiceExtensions.cs

21 lines
660 B
C#
Raw Normal View History

2021-10-13 03:59:54 +00:00
using Microsoft.Extensions.DependencyInjection;
using Wabbajack.Downloaders.GameFile;
using Wabbajack.Downloaders.Interfaces;
using Wabbajack.DTOs;
2021-10-23 16:51:17 +00:00
using Wabbajack.DTOs.DownloadStates;
2021-10-13 03:59:54 +00:00
2021-10-23 16:51:17 +00:00
namespace Wabbajack.Downloaders;
public static class ServiceExtensions
2021-10-13 03:59:54 +00:00
{
2021-10-23 16:51:17 +00:00
public static IServiceCollection AddGameFileDownloader(this IServiceCollection services)
2021-10-13 03:59:54 +00:00
{
2021-10-23 16:51:17 +00:00
return services.AddAllSingleton<IDownloader, IDownloader<GameFileSource>,
GameFileDownloader>();
}
2021-10-13 03:59:54 +00:00
2021-10-23 16:51:17 +00:00
public static IServiceCollection AddStandardGameLocator(this IServiceCollection services)
{
return services.AddAllSingleton<IGameLocator, GameLocator>();
2021-10-13 03:59:54 +00:00
}
}