public DeferredCacheController(Lifetime lifetime, ISolution solution, SolutionCaches solutionCaches,
                                       ISolutionLoadTasksScheduler tasksScheduler, IPersistentIndexManager persistentIndexManager, IPsiFiles psiFiles,
                                       SolutionAnalysisConfiguration solutionAnalysisConfiguration, IShellLocks shellLocks,
                                       DeferredHelperCache deferredHelperCache, IEnumerable <IDeferredCache> deferredCaches,
                                       DeferredCacheProgressBar progressBar, ILogger logger)
        {
            myLifetime       = lifetime;
            mySolution       = solution;
            mySolutionCaches = solutionCaches;
            myPsiFiles       = psiFiles;
            mySolutionAnalysisConfiguration = solutionAnalysisConfiguration;
            myShellLocks          = shellLocks;
            myDeferredHelperCache = deferredHelperCache;
            myDeferredCaches      = deferredCaches;
            myProgressBar         = progressBar;
            myLogger = logger;
            var defaultValue = solutionCaches.PersistentProperties.TryGetValue("DeferredCachesCompletedOnce", out var result) && result.Equals("True");

            myCompletedOnce = new ViewableProperty <bool>(defaultValue);

            myGroupingEvent = solution.Locks.GroupingEvents.CreateEvent(lifetime, "DeferredCachesCoreActivity", TimeSpan.FromMilliseconds(500), Rgc.Guarded, RunBackgroundActivity);
        }
Ejemplo n.º 2
0
 public DeferredCacheProgressBar(Lifetime lifetime, DeferredHelperCache cache)
 {
     CurrentFile = new ViewableProperty <IPsiSourceFile>(null);
 }