コード例 #1
0
        ///	<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);
        }
コード例 #2
0
        private PackReverseIndex GetReverseIdx()
        {
            lock (locker)
            {
                if (_reverseIdx == null)
                {
                    _reverseIdx = new PackReverseIndex(LoadPackIndex());
                }
            }

            return(_reverseIdx);
        }
コード例 #3
0
        /// <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
        }