public void Dispose()
 {
     if (_reader != null)
     {
         _reader.Dispose();
         _reader = null;
     }
 }
        private void OpenStream(IStreamWrapper streamObj, string encoding = null, string lineDelimiter = "\n", string eolDelimiter = null)
        {
            TextReader imReader;

            if (encoding == null)
            {
                imReader = FileOpener.OpenReader(streamObj.GetUnderlyingStream());
            }
            else
            {
                var enc = КодировкаТекста.GetEncoding(encoding);
                imReader = FileOpener.OpenReader(streamObj.GetUnderlyingStream(), enc);
            }
            _reader = GetCustomLineFeedReader(imReader, lineDelimiter, eolDelimiter, AnalyzeDefaultLineFeed);
        }
        private void OpenFile(string path, string encoding = null, string lineDelimiter = "\n", string eolDelimiter = null,
                              bool?monopoly = null)
        {
            TextReader imReader;
            var        shareMode = (monopoly ?? true) ? FileShare.None : FileShare.ReadWrite;

            if (encoding == null)
            {
                imReader = FileOpener.OpenReader(path, shareMode);
            }
            else
            {
                var enc = КодировкаТекста.GetEncoding(encoding);
                imReader = FileOpener.OpenReader(path, shareMode, enc);
            }
            _reader = GetCustomLineFeedReader(imReader, lineDelimiter, eolDelimiter, AnalyzeDefaultLineFeed);
        }