Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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);
        }