示例#1
0
 protected BaseController(IServiceProvider serviceProvider)
 {
     contentCache = serviceProvider.GetRequiredService <IContentCache>();
     rolesCache   = serviceProvider.GetRequiredService <IRolesCache>();
     userManager  = serviceProvider.GetRequiredService <SunUserManager>();
     keyGenerator = serviceProvider.GetRequiredService <CacheKeyGenerator>();
 }
示例#2
0
 internal DownloadStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     IContentCache contentCache,
     PreprocessingStepParams source
     ) : this(preprocessingStepsFactory, webViewTools, contentCache)
 {
     this.source = source;
 }
        public OutputCachingBehavior(IActionBehavior inner, IContentCache cache, IOutputWriter writer, IResourceHash resourceHash)
        {
            _inner = inner;
            _cache = cache;
            _writer = writer;
            _resourceHash = resourceHash;

            Invoker = x => x.Invoke();
            PartialInvoker = x => x.InvokePartial();
        }
示例#4
0
 public PreprocessingStepsFactory(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     IContentCache contentCache
     )
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.webViewTools = webViewTools;
     this.contentCache = contentCache;
 }
示例#5
0
 private DownloadStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     IContentCache contentCache
     )
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.webViewTools = webViewTools;
     this.contentCache = contentCache;
 }
示例#6
0
 internal DownloadStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     IContentCache contentCache,
     IReadOnlyCollection <string> ids,
     DateTime referenceTime,
     string env
     ) : this(preprocessingStepsFactory, webViewTools, contentCache)
 {
     source = new PreprocessingStepParams(MakeUrl(ids, referenceTime, env));
 }
示例#7
0
        public ForumController(IOptions <ForumOptions> forumOptions,
                               IAuthorizationService authorizationService,
                               ICategoriesCache categoriesCache,
                               IContentCache contentCache,
                               OperationKeysContainer operationKeysContainer,
                               IForumPresenter forumPresenter,
                               IServiceProvider serviceProvider) : base(serviceProvider)
        {
            OperationKeys = operationKeysContainer;

            this.forumPresenter       = forumPresenter;
            this.forumOptions         = forumOptions.Value;
            this.authorizationService = authorizationService;
            this.categoriesCache      = categoriesCache;
        }
示例#8
0
        public GraphQLExecutionContext(
            IDataLoaderContextAccessor dataLoaders,
            IAssetQueryService assetQuery,
            IAssetCache assetCache,
            IContentQueryService contentQuery,
            IContentCache contentCache,
            IServiceProvider serviceProvider,
            Context context)
            : base(assetQuery, assetCache, contentQuery, contentCache, serviceProvider)
        {
            this.dataLoaders = dataLoaders;

            Context = context.Clone(b => b
                                    .WithoutCleanup()
                                    .WithoutContentEnrichment());
        }
示例#9
0
        protected QueryExecutionContext(
            IAssetQueryService assetQuery,
            IAssetCache assetCache,
            IContentQueryService contentQuery,
            IContentCache contentCache,
            IServiceProvider serviceProvider)
        {
            Guard.NotNull(serviceProvider);

            AssetQuery   = assetQuery;
            AssetCache   = assetCache;
            ContentQuery = contentQuery;
            ContentCache = contentCache;

            Services = serviceProvider;
        }
示例#10
0
 protected BundleBase(IFileWriterFactory fileWriterFactory, IFileReaderFactory fileReaderFactory, IDebugStatusReader debugStatusReader, IDirectoryWrapper directoryWrapper, IHasher hasher, IContentCache bundleCache, IContentCache rawContentCache)
 {
     this.fileWriterFactory = fileWriterFactory;
     this.fileReaderFactory = fileReaderFactory;
     this.debugStatusReader = debugStatusReader;
     this.directoryWrapper  = directoryWrapper;
     this.hasher            = hasher;
     bundleState            = new BundleState
     {
         DebugPredicate = Configuration.Instance.DefaultDebugPredicate,
         ShouldRenderOnlyIfOutputFileIsMissing = false,
         HashKeyName = Configuration.Instance.DefaultHashKeyName,
         CacheInvalidationStrategy = Configuration.Instance.DefaultCacheInvalidationStrategy
     };
     this.bundleCache     = bundleCache;
     this.rawContentCache = rawContentCache;
 }
示例#11
0
        public CachingContentCollector(IContainer <T> aContainer, IContentCache <T> aCache, int aRangeSize, int aThreadCount, int aReadAheadRanges)
        {
            Assert.Check(aContainer != null);
            Assert.Check(aCache != null);
            Assert.Check(aRangeSize > 0);
            iRangeSize        = aRangeSize;
            iContainer        = aContainer;
            iDequeueScheduler = new Scheduler("ContentCollectorDequeue", aThreadCount);
            iDequeueScheduler.SchedulerError += iScheduler_SchedulerError;
            iReadAheadRanges   = aReadAheadRanges;
            iCache             = aCache;
            iOpened            = false;
            iDisposed          = false;
            iQueuedRequests    = new List <RangeRequest>();
            iExecutingRequests = new Dictionary <int, int>();
            iQueueLock         = new object();
            iIsRunning         = true;
            iRunningEvent      = new ManualResetEvent(true);

            iDequeueScheduler.Schedule(new Scheduler.DCallback(Open));
        }
 public JavaScriptBundle(IDebugStatusReader debugStatusReader, IFileWriterFactory fileWriterFactory, IFileReaderFactory fileReaderFactory, IDirectoryWrapper directoryWrapper, IHasher hasher, IContentCache bundleCache, IContentCache rawContentCache) :
     base(fileWriterFactory, fileReaderFactory, debugStatusReader, directoryWrapper, hasher, bundleCache, rawContentCache)
 {
 }
示例#13
0
 // new style content collector - choose your cache, range size, thread count and number of chunks to read ahead at a time
 public static IContentCollector <upnpObject> Create(IContainer aContainer, IContentCache <upnpObject> aCache, int aRangeSize, int aThreadCount, int aReadAheadRanges)
 {
     return(new CachingContentCollector <upnpObject>(new ContainerWrapper(aContainer), aCache, aRangeSize, aThreadCount, aReadAheadRanges));
 }
示例#14
0
 public Client(IClientConfiguration config, HttpClient client, IContentCache cache)
 {
     _config = config;
     _client = client;
     _cache  = cache;
 }
示例#15
0
 public ContentService(IContentManager contentManager, IContentCache contentsCache)
 {
     _contentManager = contentManager ?? throw new ArgumentException(nameof(IContentManager));
     _contentsCache  = contentsCache ?? throw new ArgumentException(nameof(IContentCache));
 }
示例#16
0
 public CacheSettingsManager(IOptions <CacheOptions> cacheOptions,
                             IContentCache contentCache, DataBaseConnection db) : base(db)
 {
     this.cacheOptions = cacheOptions;
     this.contentCache = contentCache;
 }
示例#17
0
 public PublishedCacheQueryVisitor(IContentCache cache)
 {
     this.cache = cache;
 }
示例#18
0
 public WebContentCache(IContentCache rawContentCache, IWebContentCacheConfig config)
 {
     this.rawContentCache = rawContentCache;
     this.config          = config;
 }