public void Reset()
 {
     // don't bother if we haven't moved.
     if (-1 == _state)
     {
         return;
     }
     try
     {
         // optimization for streamreader.
         var sr = _reader as StreamReader;
         if (null != sr && null != sr.BaseStream && sr.BaseStream.CanSeek && 0L == sr.BaseStream.Seek(0, SeekOrigin.Begin))
         {
             _state = -1;
             return;
         }
     }
     catch (IOException) { }
     if (!_outer.CanCreateReader)
     {
         throw new NotSupportedException();
     }
     _Dispose(true);
     _reader = _outer.CreateTextReader();
     _state  = -1;
 }
 internal TextReaderEnumerator(TextReaderEnumerable outer)
 {
     _outer  = outer;
     _reader = null;
     if (_outer.CanCreateReader)
     {
         Reset();
     }
     else
     {
         _state  = -1;
         _reader = _outer.CreateTextReader();                     // doesn't really recreate it
     }
 }