Source/NFX/Log/Bin/LogReader.cs
/// <summary>
/// Opens the appropriate reader type from the stream
/// </summary>
Opens the appropriate reader type from the stream
Opens the appropriate reader type from the stream
public static LogReader Open(Stream stream)
      {
        checkStream(stream, "LogReader.Open()");
        var pos = stream.Position;
        var type = readHeader(stream);
        stream.Seek(pos, SeekOrigin.Begin);
        LogReader result;
        try
        {
          result = (LogReader)Activator.CreateInstance(type, stream);
        }
        catch(Exception error)
        {
          throw new BinLogException(StringConsts.BINLOG_READER_FACTORY_ERROR+error.ToMessageWithType(), error);
        }
        return result;
      }
public static LogReader Open ( Stream stream ) { checkStream ( stream , " " ) ; var pos = stream . Position ; var type = readHeader ( stream ) ; stream . Seek ( pos , SeekOrigin . Begin ) ; LogReader result ; try { result = ( LogReader ) Activator . CreateInstance ( type , stream ) ; } catch ( Exception error ) { throw new BinLogException ( StringConsts . BINLOG_READER_FACTORY_ERROR + error . ToMessageWithType ( ) , error ) ; } return result ; }
Opens the appropriate reader type from the stream
Opens the appropriate reader type from the stream
stream
Stream