public override CompileAttribute Read(EndianBinaryReader reader, List<CompileConstant> constants, int length) { Data =reader.ReadBytes(length); return this; }
public override CompileConstant Read(EndianBinaryReader reader) { short length = reader.ReadInt16(); Value = reader.ReadBytes(length); return this; }
public override CompileAttribute Read(EndianBinaryReader reader, List<CompileConstant> constants, int length) { MaxStack = reader.ReadInt16(); MaxLocals = reader.ReadInt16(); int codeLength = reader.ReadInt32(); Code = reader.ReadBytes(codeLength); ExceptionTable = new List<ExceptionTableEntry>(); short exceptionCount = reader.ReadInt16(); for (int i = 0; i < exceptionCount; i++) { var exception = new ExceptionTableEntry(); exception.StartPC = reader.ReadInt16(); exception.EndPC = reader.ReadInt16(); exception.HandlerPC = reader.ReadInt16(); exception.CatchType = reader.ReadInt16(); ExceptionTable.Add(exception); } Attributes = new List<CompileAttribute>(); short attributeCount = reader.ReadInt16(); for (int i = 0; i < attributeCount; i++) { Attributes.Add(ReadAttribute(reader, constants)); } return this; }