コード例 #1
0
        public PackSourceChecker(IEnumerable <IPackProvider> packProviders, PackPreFilterer packPreFilterer, IReadOnlyList <IAdditionalDataProducer> additionalDataProducers, bool saveCandidatePacks)
        {
            _packProviders           = packProviders;
            _packPreFilterer         = packPreFilterer;
            _additionalDataProducers = additionalDataProducers;
            _saveCandidatePacks      = saveCandidatePacks;

            _packChecker = new PackChecker();
        }
コード例 #2
0
        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();
        }