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


C# MethodBase.GetName方法代码示例

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


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

示例1: MethodGenericInvocationDescriptor

        internal MethodGenericInvocationDescriptor(MethodBase method, Assembly containingAssembly)
            : this()
        {
            var parts = new List<string>();

            MethodGenericInvocationDescriptor.AddLocation(method, parts);
            MethodGenericInvocationDescriptor.AddCallingConventions(method, parts);
            MethodGenericInvocationDescriptor.AddReturnValue(method, containingAssembly, parts);

            parts.Add(method.GetName(containingAssembly, false) +
                MethodGenericDescriptor.GetGenericDeclarationInformation(
                    method as MethodInfo, containingAssembly, false) +
                MethodGenericInvocationDescriptor.GetMethodArgumentInformation(method, containingAssembly));

            this.Value = string.Join(" ", parts.ToArray());
        }
开发者ID:JasonBock,项目名称:EmitDebugging,代码行数:16,代码来源:MethodGenericInvocationDescriptor.cs

示例2: MethodGenericDeclarationDescriptor

        internal MethodGenericDeclarationDescriptor(MethodBase method, Assembly containingAssembly)
            : base()
        {
            var descriptors = new List<string>();

            MethodGenericDeclarationDescriptor.AddAttributes(method, descriptors);
            MethodGenericDeclarationDescriptor.AddLocation(method, descriptors);
            MethodGenericDeclarationDescriptor.AddCallingConventions(method, descriptors);
            MethodGenericDeclarationDescriptor.AddReturnType(method, containingAssembly, descriptors);

            descriptors.Add(method.GetName(containingAssembly, true) +
                MethodGenericDescriptor.GetGenericDeclarationInformation(
                    (method as MethodInfo), containingAssembly, true) +
                MethodGenericDeclarationDescriptor.GetMethodArgumentInformation(method, containingAssembly));
            descriptors.Add("cil managed");

            this.Value = string.Join(" ", descriptors.ToArray());
        }
开发者ID:JasonBock,项目名称:EmitDebugging,代码行数:18,代码来源:MethodGenericDeclarationDescriptor.cs

示例3: MethodDescriptor

        internal MethodDescriptor(MethodBase method, Assembly containingAssembly, bool isDeclaration)
            : base()
        {
            var parts = new List<string>();

            MethodDescriptor.AddAttributes(method, isDeclaration, parts);
            MethodDescriptor.AddLocation(method, isDeclaration, parts);
            MethodDescriptor.AddCallingConventions(method, parts);
            MethodDescriptor.AddReturnValue(method, containingAssembly, parts);

            parts.Add(method.GetName(containingAssembly, isDeclaration) +
                MethodDescriptor.GetMethodArgumentInformation(method, containingAssembly, isDeclaration));

            if(isDeclaration)
            {
                parts.Add("cil managed");
            }

            this.Value = string.Join(" ", parts.ToArray());
        }
开发者ID:JasonBock,项目名称:EmitDebugging,代码行数:20,代码来源:MethodDescriptor.cs

示例4: DirectMethod

 internal DirectMethod(MethodBase method)
 {
     this.Name = method.GetName();
     this.Len = method.GetParameters().Length;
     this.IsFormHandler = method.IsFormHandler();
 }
开发者ID:xcrash,项目名称:ext-direct-mvc,代码行数:6,代码来源:DirectMethod.cs


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