1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

Fixed composition.

This commit is contained in:
Taloth Saldono 2015-09-21 23:22:34 +02:00
parent 57afa668e1
commit 30bcc662bc
2 changed files with 4 additions and 2 deletions

View File

@ -54,6 +54,7 @@ public void RegisterSingleton(Type service, Type implementation)
var factory = CreateSingletonImplementationFactory(implementation);
_container.Register(service, factory);
_container.Register(service, factory, implementation.FullName);
}
public IEnumerable<T> ResolveAll<T>() where T : class

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using NLog;
using NzbDrone.Common.Cache;
@ -28,13 +29,13 @@ public class HttpClient : IHttpClient
private readonly IRateLimitService _rateLimitService;
private readonly ICached<CookieContainer> _cookieContainerCache;
private readonly ICached<bool> _curlTLSFallbackCache;
private readonly IEnumerable<IHttpRequestInterceptor> _requestInterceptors;
private readonly List<IHttpRequestInterceptor> _requestInterceptors;
public HttpClient(IEnumerable<IHttpRequestInterceptor> requestInterceptors, ICacheManager cacheManager, IRateLimitService rateLimitService, Logger logger)
{
_logger = logger;
_rateLimitService = rateLimitService;
_requestInterceptors = requestInterceptors;
_requestInterceptors = requestInterceptors.ToList();
ServicePointManager.DefaultConnectionLimit = 12;
_cookieContainerCache = cacheManager.GetCache<CookieContainer>(typeof(HttpClient));