public UrlReplacementsProvider(ICachingProxyConfig config) { //TODO This implementation is too simple, actually we should make a request to index.json and // then look through all service endpoints. // Currently it works by accident that all URLs are starting with v3 v3baseAddress = config.V3NugetIndexSource.Replace("/index.json", ""); v3flatcontainer = config.V3NugetIndexSource.Replace("v3/index.json", "v3-flatcontainer"); }
public CatalogInvalidator( ICachingProxyConfig config, ICatalogScanStore store, ICatalogReader reader) { this.store = store; var period = TimeSpan.FromSeconds(config.InvalidationCheckSeconds); _scanTimer = new Timer(state => Run(), null, period, period); this.reader = reader; }
public NuGetCatalogReader(ICachingProxyConfig config) { var indexUrl = new System.Uri(config.V3NugetIndexSource); var cache = new SourceCacheContext() { NoCache = true, DirectDownload = true }; reader = new CatalogReader(indexUrl, null, cache, TimeSpan.Zero, new Log4NetLoggerAdapter(_log)); }
public CatalogInvalidatorTest() { config = new LiGetEnvironmentConfig(); store = new Mock <ICatalogScanStore>(MockBehavior.Strict); reader = new Mock <ICatalogReader>(MockBehavior.Strict); }
public CachingProxyAutofacModule(ICachingProxyConfig cacheConfig) { this.cacheConfig = cacheConfig ?? throw new System.ArgumentNullException(nameof(cacheConfig)); }