internal LogStreamHeader(LogReader reader)
        {
            var id = reader.ReadInt32();

            if (id != Id)
            {
                throw new LogException($"Invalid stream header ID (0x{id:X}).");
            }

            Version       = new Version(reader.ReadByte(), reader.ReadByte());
            FormatVersion = reader.ReadByte();

            if (FormatVersion < MinVersion || FormatVersion > MaxVersion)
            {
                throw new LogException($"Unsupported MLPD version {FormatVersion}. Should be >= {MinVersion} and <= {MaxVersion}.");
            }

            PointerSize = reader.ReadByte();
            StartupTime = reader.ReadUInt64();

            if (Version.Major >= 3)
            {
                TimestampStartupTime = reader.ReadUInt64();
            }

            TimerOverhead   = reader.ReadInt32();
            Flags           = reader.ReadInt32();
            ProcessId       = reader.ReadInt32();
            Port            = reader.ReadUInt16();
            Arguments       = reader.ReadHeaderString();
            Architecture    = reader.ReadHeaderString();
            OperatingSystem = reader.ReadHeaderString();
        }
Exemplo n.º 2
0
        internal LogStreamHeader(LogReader reader)
        {
            var id = reader.ReadInt32();

            if (id != Id)
            {
                throw new LogException($"Invalid stream header ID (0x{id:X}).");
            }

            Version         = new Version(reader.ReadByte(), reader.ReadByte());
            FormatVersion   = reader.ReadByte();
            PointerSize     = reader.ReadByte();
            StartupTime     = reader.ReadUInt64();
            TimerOverhead   = reader.ReadInt32();
            Flags           = reader.ReadInt32();
            ProcessId       = reader.ReadInt32();
            Port            = reader.ReadUInt16();
            Arguments       = reader.ReadHeaderString();
            Architecture    = reader.ReadHeaderString();
            OperatingSystem = reader.ReadHeaderString();
        }