Load() public static method

public static Load ( string fileName, ILoader loader, Microsoft.Extensions.Logging.ILogger logger ) : QueryBoostingContext
fileName string
loader ILoader
logger Microsoft.Extensions.Logging.ILogger
return QueryBoostingContext
Exemplo n.º 1
0
        private void ReloadAuxiliaryDataIfExpired()
        {
            if (LastAuxiliaryDataLoadTime == null || LastAuxiliaryDataLoadTime < DateTime.UtcNow - _auxiliaryDataRefreshRate)
            {
                IndexingUtils.Load(AuxiliaryFiles.Owners, _loader, _logger, _owners);
                IndexingUtils.Load(AuxiliaryFiles.CuratedFeeds, _loader, _logger, _curatedFeeds);
                _downloads.Load(AuxiliaryFiles.DownloadsV1, _loader, _logger);
                _rankings             = DownloadRankings.Load(AuxiliaryFiles.RankingsV1, _loader, _logger);
                _queryBoostingContext = QueryBoostingContext.Load(AuxiliaryFiles.SearchSettingsV1, _loader, _logger);
                _verifiedPackages     = VerifiedPackages.Load(AuxiliaryFiles.VerifiedPackages, _loader, _logger);

                LastAuxiliaryDataLoadTime = DateTime.UtcNow;
                AuxiliaryFiles.UpdateLastModifiedTime();
            }
        }