GetInstruction() static private method

static private GetInstruction ( Collection instructions, int offset ) : Instruction
instructions Collection
offset int
return Instruction
Esempio n. 1
0
        private void ReadMethodBody()
        {
            this.MoveTo(this.method.RVA);
            byte num  = base.ReadByte();
            int  num1 = num & 3;

            if (num1 == 2)
            {
                this.body.code_size    = num >> 2;
                this.body.MaxStackSize = 8;
                this.ReadCode();
            }
            else
            {
                if (num1 != 3)
                {
                    throw new InvalidOperationException();
                }
                this.position--;
                this.ReadFatMethod();
            }
            ISymbolReader symbolReader = this.reader.module.symbol_reader;

            if (symbolReader != null)
            {
                Collection <Instruction> instructions = this.body.Instructions;
                symbolReader.Read(this.body, (int offset) => CodeReader.GetInstruction(instructions, offset));
            }
        }
Esempio n. 2
0
 private Instruction GetInstruction(int offset)
 {
     return(CodeReader.GetInstruction(this.body.Instructions, offset));
 }