public ChecksumScope( ChecksumTreeCollection trees, IRootChecksumTreeNode tree, SolutionChecksumObject solutionChecksum) { _trees = trees; _tree = tree; SolutionChecksum = solutionChecksum; _trees.RegisterSnapshot(this, tree); }
public void RegisterSnapshot(ChecksumScope snapshot, IRootChecksumTreeNode cache) { // duplicates are not allowed, there can be multiple snapshots to same solution, so no ref counting. Contract.ThrowIfFalse(_rootTreeNodes.TryAdd(snapshot, (RootTreeNode)cache)); }