当前位置: 首页>>代码示例>>C#>>正文


C# RuntimeMethod.ToString方法代码示例

本文整理汇总了C#中RuntimeMethod.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# RuntimeMethod.ToString方法的具体用法?C# RuntimeMethod.ToString怎么用?C# RuntimeMethod.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RuntimeMethod的用法示例。


在下文中一共展示了RuntimeMethod.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Link

        /// <summary>
        /// Issues a linker request for the given runtime method.
        /// </summary>
        /// <param name="linkType">The type of link required.</param>
        /// <param name="method">The method the patched code belongs to.</param>
        /// <param name="methodOffset">The offset inside the method where the patch is placed.</param>
        /// <param name="methodRelativeBase">The base virtualAddress, if a relative link is required.</param>
        /// <param name="targetSymbolName">The linker symbol to link against.</param>
        /// <param name="offset">The offset to apply to the symbol to link against.</param>
        /// <returns>
        /// The return value is the preliminary virtualAddress to place in the generated machine
        /// code. On 32-bit systems, only the lower 32 bits are valid. The above are not used. An implementation of
        /// IAssemblyLinker may not rely on 64-bits being stored in the memory defined by position.
        /// </returns>
        public virtual long Link(LinkType linkType, RuntimeMethod method, int methodOffset, int methodRelativeBase, string targetSymbolName, IntPtr offset)
        {
            Debug.Assert(null != targetSymbolName, @"Symbol can't be null.");
            if (null == targetSymbolName)
                throw new ArgumentNullException(@"symbol");

            string symbolName = method.ToString();
            return this.Link(linkType, symbolName, methodOffset, methodRelativeBase, targetSymbolName, offset);
        }
开发者ID:davidbjornn,项目名称:MOSA-Project,代码行数:23,代码来源:AssemblyLinkerStage.cs

示例2: CompileMethod

        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;
                //}
            }
        }
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:22,代码来源:MethodCompilerSchedulerStage.cs

示例3: FromMethod

        /// <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);
        }
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:11,代码来源:SymbolOperand.cs

示例4: CreateSymbolName

        private string CreateSymbolName(RuntimeMethod symbol)
        {
            //if (symbol == null)
            //    throw new ArgumentNullException("symbol");

            //// TODO: If it is a generic method instance, then the symbol name needs to be carefully constructed. ~BMarkham,2/18/09
            //if (symbol.IsGeneric)
            //    throw new NotImplementedException();

            //StringBuilder sb = new StringBuilder();
            //sb.Append(CreateSymbolName(symbol.DeclaringType));
            //sb.Append('.');
            //sb.Append(symbol.Name);
            //sb.Append('(');
            //bool hasEmittedSignaturePart = false;
            //foreach (SigType parameterSignatureType in symbol.Signature.Parameters) {
            //    if (hasEmittedSignaturePart)
            //        sb.Append(',');
            //    sb.Append(parameterSignatureType.ToSymbolPart()); // FIXME : This obviously doesn't work! We need to emit class names.
            //    hasEmittedSignaturePart = true;
            //}
            //sb.Append(')');
            //return sb.ToString();

            string symbolName = symbol.ToString();
            return symbolName;
        }
开发者ID:hj1980,项目名称:MOSA-Project,代码行数:27,代码来源:AssemblyLinkerStage.cs


注:本文中的RuntimeMethod.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。