- public readonly int Index;
- public readonly int Offset;
- public readonly int Size;
- public readonly AddressMode Mode;
- public readonly int BeginScope;
- public readonly int EndScope;
+ public readonly string Name;
+ public readonly FieldAttributes Attributes;
+ public readonly byte[] Signature;
+
+ public LocalVariableEntry (string Name, FieldAttributes Attributes, byte[] Signature)
+ {
+ this.Name = Name;
+ this.Attributes = Attributes;
+ this.Signature = Signature;
+ }
+
+ public LocalVariableEntry (IMonoBinaryReader reader)
+ {
+ int name_length = reader.ReadInt32 ();
+ byte[] name = reader.ReadBuffer (name_length);
+ Name = Encoding.UTF8.GetString (name);
+ Attributes = (FieldAttributes) reader.ReadInt32 ();
+ int sig_length = reader.ReadInt32 ();
+ Signature = reader.ReadBuffer (sig_length);
+ }
+
+ internal void Write (BinaryWriter bw)
+ {
+ byte[] name = Encoding.UTF8.GetBytes (Name);
+ bw.Write ((int) name.Length);
+ bw.Write (name);
+ bw.Write ((int) Attributes);
+ bw.Write ((int) Signature.Length);
+ bw.Write (Signature);
+ }