mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
20 lines
712 B
C#
20 lines
712 B
C#
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>()
|
|
.AddSingleton<IResource<IFtpSiteCredentials>>(s => new Resource<IFtpSiteCredentials>("FTP Uploads", 8));
|
|
}
|
|
} |