Lucene.Net.Store.MockDirectoryWrapper.MockDirectoryWrapper C# (CSharp) Method

MockDirectoryWrapper() public method

public MockDirectoryWrapper ( Random random, Directory @delegate ) : NUnit.Framework
random Random
@delegate Directory
return NUnit.Framework
        public MockDirectoryWrapper(Random random, Directory @delegate)
            : base(@delegate)
        {
            // must make a private random since our methods are
            // called from different threads; else test failures may
            // not be reproducible from the original seed
            this.RandomState = new Random(random.Next());
            this.ThrottledOutput = new ThrottledIndexOutput(ThrottledIndexOutput.MBitsToBytes(40 + RandomState.Next(10)), 5 + RandomState.Next(5), null);
            // force wrapping of lockfactory
            this.LockFactory_Renamed = new MockLockFactoryWrapper(this, @delegate.LockFactory);
            Init();
        }