/// <summary> /// Set up tested class instance, test constructor by the way. /// </summary> public override void setUp() { base.setUp(); // index with both small (< 2^31) and big offsets var fi = new FileInfo("Resources/pack-huge.idx"); Assert.IsTrue(fi.Exists, "Does the index exist"); _idx = PackIndex.Open(fi); _reverseIdx = new PackReverseIndex(_idx); }
private PackReverseIndex GetReverseIdx() { lock (locker) { if (_reverseIdx == null) { _reverseIdx = new PackReverseIndex(LoadPackIndex()); } } return(_reverseIdx); }
/// <summary> /// Close the resources utilized by this repository. /// </summary> public void Close() { UnpackedObjectCache.purge(this); WindowCache.Purge(this); lock (locker) { _loadedIdx = null; _reverseIdx = null; } #if DEBUG GC.SuppressFinalize(this); // Disarm lock-release checker #endif }