public PackSourceChecker(IEnumerable <IPackProvider> packProviders, PackPreFilterer packPreFilterer, IReadOnlyList <IAdditionalDataProducer> additionalDataProducers, bool saveCandidatePacks) { _packProviders = packProviders; _packPreFilterer = packPreFilterer; _additionalDataProducers = additionalDataProducers; _saveCandidatePacks = saveCandidatePacks; _packChecker = new PackChecker(); }
internal PackSourceChecker( IEnumerable <IPackProvider> packProviders, PackPreFilterer packPreFilterer, IReadOnlyList <IAdditionalDataProducer> additionalDataProducers, bool saveCandidatePacks, TemplateSearchCache?existingData = null, IEnumerable <FilteredPackageInfo>?knownFilteredPackages = null) { _packProviders = packProviders; _packPreFilterer = packPreFilterer; _additionalDataProducers = additionalDataProducers; _saveCandidatePacks = saveCandidatePacks; _existingCache = existingData?.TemplatePackages.ToDictionary(p => p.Name) ?? new Dictionary <string, TemplatePackageSearchData>(); _knownFilteredPackages = knownFilteredPackages?.ToDictionary(item => item.Name) ?? new Dictionary <string, FilteredPackageInfo>(); _diffEnabled = _existingCache.Any(); }