wabbajack/Wabbajack.Server.Lib/ServiceExtensions.cs

22 lines
757 B
C#
Raw Normal View History

2021-09-27 12:42:46 +00:00
using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Wabbajack.DTOs;
using Wabbajack.Networking.Http.Interfaces;
using Wabbajack.RateLimiter;
using Wabbajack.Server.Lib.DTOs;
using Wabbajack.Server.Lib.TokenProviders;
namespace Wabbajack.Server.Lib
{
public static class ServiceExtensions
{
public static IServiceCollection AddServerLib(this IServiceCollection services)
{
return services
.AddAllSingleton<ITokenProvider<Dictionary<StorageSpace, FtpSite>>, IFtpSiteCredentials, FtpSiteCredentialsProvider>()
2021-10-18 21:12:32 +00:00
.AddSingleton<IResource<IFtpSiteCredentials>>(s => new Resource<IFtpSiteCredentials>("FTP Uploads", 8));
2021-09-27 12:42:46 +00:00
}
}
}