Hey,

On Tue, Sep 7, 2010 at 11:31 PM, Alois Kraus <[email protected]> wrote:
> void Read (MethodBody body, InstructionMapper mapper);
>
> But I did not see what method I need to provide as valid instruction
> mapper for a given MethodBody. At least I did not see how a valid one
> should work.

An InstructionMapper should simply be able to return a instruction at
a given offset. The simplest one in your case would be:

reader.Read (method.Body, offset =>
method.Body.Instructions.FirstOrDefault (i => i.Offset == offset));

-- 
Jb EvainĀ  <[email protected]>

-- 
--
mono-cecil

Reply via email to