Exemplo n.º 1
0
            public Cache(ChecksumTreeNodeCacheCollection owner, Solution solution) :
                base(solution)
            {
                _owner = owner;
                _cache = new ConcurrentDictionary <object, ChecksumObjectCache>(concurrencyLevel: 2, capacity: 1);

                // TODO: specialize root checksum tree node cache vs all sub tree node cache
            }
Exemplo n.º 2
0
            public Cache GetOrCreateSubTreeNodeCache(ChecksumTreeNodeCacheCollection owner, Solution solution)
            {
                if (_lazyChecksumTree != null)
                {
                    return(_lazyChecksumTree);
                }

                Interlocked.CompareExchange(ref _lazyChecksumTree, new Cache(owner, solution), null);
                return(_lazyChecksumTree);
            }
Exemplo n.º 3
0
        public ChecksumScope(
            ChecksumTreeNodeCacheCollection caches,
            ChecksumTreeNodeCache cache,
            SolutionChecksumObject solutionChecksum)
        {
            _caches = caches;
            _cache  = cache;

            SolutionChecksum = solutionChecksum;

            _caches.RegisterSnapshot(this, cache);
        }
Exemplo n.º 4
0
 public Service(HostWorkspaceServices workspaceServices, ChecksumTreeNodeCacheCollection caches)
 {
     _workspaceServices = workspaceServices;
     _caches            = caches;
 }