Exemple #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);
        }
Exemple #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);
        }
Exemple #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;
 }
Exemple #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);
        }