public static List <Instruction> GetInstructions(MethodBase method) { var reader = new MethodBodyReader(method); try { reader.ReadInstructions(); } catch (Exception ex) { throw new Exception("Method: " + method + ", " + ex.Message); } return(reader.instructions); }
public static IList <Instruction> GetInstructions(MethodBase method) { var mb = method.GetMethodBody(); if (mb == null) { return(new List <Instruction>()); } var reader = new MethodBodyReader(method, mb); reader.ReadInstructions(); return(reader.instructions); }
public static IList<Instruction> GetInstructions(MethodBase method) { var mb = method.GetMethodBody(); if (mb == null) { return new List<Instruction>(); } var reader = new MethodBodyReader(method, mb); reader.ReadInstructions(); return reader.instructions; }
public static IList <Instruction> GetInstructions(this MethodBase self) { return(MethodBodyReader.GetInstructions(self).AsReadOnly()); }
public static List<Instruction> GetInstructions (MethodBase method) { var reader = new MethodBodyReader (method); reader.ReadInstructions (); return reader.instructions; }
public static List <LocalVariableInfo> GetLocalVariables(MethodBase method) { var reader = new MethodBodyReader(method); return(reader.locals); }