Lucene.Net.Index.StandardDirectoryReader.DoOpenNoWriter C# (CSharp) Method

DoOpenNoWriter() private method

private DoOpenNoWriter ( IndexCommit commit ) : DirectoryReader
commit IndexCommit
return DirectoryReader
        private DirectoryReader DoOpenNoWriter(IndexCommit commit)
        {
            if (commit == null)
            {
                if (Current)
                {
                    return null;
                }
            }
            else
            {
                if (Directory_Renamed != commit.Directory)
                {
                    throw new System.IO.IOException("the specified commit does not match the specified Directory");
                }
                if (SegmentInfos != null && commit.SegmentsFileName.Equals(SegmentInfos.SegmentsFileName))
                {
                    return null;
                }
            }

            return DoOpenFromCommit(commit);
        }