public void Parse <T>(EventRecordReader reader, T writer, EventMetadata[] metadataArray, RuntimeEventMetadata runtimeMetadata) where T : IEtwWriter { writer.WriteEventBegin(EventMetadata, runtimeMetadata); writer.WritePropertyBegin(ImageBase); writer.WriteUInt64(reader.ReadUInt64()); writer.WritePropertyEnd(); writer.WritePropertyBegin(ProcessId); writer.WriteUInt32(reader.ReadUInt32()); writer.WritePropertyEnd(); writer.WritePropertyBegin(GuidSig); writer.WriteGuid(reader.ReadGuid()); writer.WritePropertyEnd(); writer.WritePropertyBegin(Age); writer.WriteUInt32(reader.ReadUInt32()); writer.WritePropertyEnd(); writer.WritePropertyBegin(PdbFileName); writer.WriteAnsiString(reader.ReadAnsiString()); writer.WritePropertyEnd(); writer.WriteEventEnd(); }
public void Parse <T>(EventRecordReader reader, T writer, EventMetadata[] metadataArray, RuntimeEventMetadata runtimeMetadata) where T : IEtwWriter { writer.WriteEventBegin(EventMetadata, runtimeMetadata); int pointerSize = (runtimeMetadata.Flags & Etw.EVENT_HEADER_FLAG_32_BIT_HEADER) != 0 ? 4 : 8; int numberOfStacks = (runtimeMetadata.UserDataLength - 16) / pointerSize; writer.WritePropertyBegin(EventTimeStampMetadata); writer.WriteUInt64(reader.ReadUInt64()); writer.WritePropertyEnd(); writer.WritePropertyBegin(StackProcessMetadata); writer.WriteUInt32(reader.ReadUInt32()); writer.WritePropertyEnd(); writer.WritePropertyBegin(StackThreadMetadata); writer.WriteUInt32(reader.ReadUInt32()); writer.WritePropertyBegin(StacksPropertyMetadata); writer.WriteArrayBegin(); for (int i = 0; i < numberOfStacks; ++i) { writer.WritePointer(reader.ReadPointer()); } writer.WriteArrayEnd(); writer.WritePropertyEnd(); writer.WriteEventEnd(); }
public void Parse <T>(EventRecordReader reader, T writer, EventMetadata[] metadataArray, RuntimeEventMetadata runtimeMetadata) where T : IEtwWriter { writer.WriteEventBegin(EventMetadata, runtimeMetadata); writer.WritePropertyBegin(ImageBase); writer.WritePointer(reader.ReadPointer()); writer.WritePropertyEnd(); writer.WritePropertyBegin(ImageSize); writer.WriteUInt32(reader.ReadUInt32()); writer.WritePropertyEnd(); reader.ReadPointer(); writer.WritePropertyBegin(TimeDateStamp); writer.WriteUInt32(reader.ReadUInt32()); writer.WritePropertyEnd(); writer.WritePropertyBegin(OriginalFileName); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WriteEventEnd(); }
public void Parse <T>(EventRecordReader reader, T writer, EventMetadata[] metadataArray, RuntimeEventMetadata runtimeMetadata) where T : IEtwWriter { writer.WriteEventBegin(EventMetadata, runtimeMetadata); writer.WritePropertyBegin(ImageSize); writer.WriteUInt64(reader.ReadUInt32()); writer.WritePropertyEnd(); writer.WritePropertyBegin(TimeDateStamp); writer.WriteUInt64(reader.ReadUInt32()); writer.WritePropertyEnd(); writer.WritePropertyBegin(OrigFileName); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(FileDescription); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(FileVersion); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(BinFileVersion); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(VerLanguage); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(ProductName); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(CompanyName); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(ProductVersion); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(FileId); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WritePropertyBegin(ProgramId); writer.WriteUnicodeString(reader.ReadUnicodeString()); writer.WritePropertyEnd(); writer.WriteEventEnd(); }