Example #1
0
        protected string FormatRuntimeMember(RuntimeMethod method)
        {
            if (!showTokenValues.Checked)
                return method.Name;

            return "[" + TokenToString(method.Token) + "] " + method.ToString();
        }
Example #2
0
        /// <summary>
        /// Creates a symbol operand for the given method.
        /// </summary>
        /// <param name="method">The method to create a symbol operand for.</param>
        /// <returns>The created symbol operand.</returns>
        public static SymbolOperand FromMethod(RuntimeMethod method)
        {
            string symbolName = method.ToString();

            return new SymbolOperand(BuiltInSigType.IntPtr, symbolName);
        }
        private void CompileMethod(RuntimeMethod method)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.Write(@"[Compiling]  ");
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine(method.ToString());
            Debug.WriteLine(@"Compiling " + method.ToString());
            using (IMethodCompiler mc = compiler.CreateMethodCompiler(this, method.DeclaringType, method))
            {
                mc.Compile();

                //try
                //{
                //    mc.Compile();
                //}
                //catch (Exception e)
                //{
                //    HandleCompilationException(e);
                //    throw;
                //}
            }
        }