/// <summary> /// Creates a new local value of the specified type and returns its value index. /// </summary> public ushort AddLocal(TypeDefinition type, LocalFlags flags) { if (_values.Count == ushort.MaxValue) { throw new IndexOutOfRangeException("Out of local indices"); } _values.Add(new LocalValue(type, flags)); return((ushort)(_values.Count - 1)); }
internal override void Deserialize(IDefinitionReader reader) { if (reader == null) { throw new ArgumentNullException(nameof(reader)); } var type = reader.ReadReference <NativeDefinition>(); var flags = (LocalFlags)reader.ReadValueU8(); var unknownFlags = flags & ~KnownFlags; if (unknownFlags != LocalFlags.None) { throw new FormatException(); } this.Type = type; this.Flags = flags; }
public LocalValue(TypeDefinition type, LocalFlags flags) { Type = type; Flags = flags; }