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


C# MethodDefinition.Accept方法代码示例

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


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

示例1: WriteMethodSignature

        /// <summary>
        /// Write a method signature to the text buffer
        /// </summary>
        /// <param name="mdef">Method definition</param>
        protected override void WriteMethodSignature(MethodDefinition mdef)
        {
            mdef.Accept(this);

            if (mdef.GenericParameters.Count > 0)
            {
                foreach (GenericParameter genparam in mdef.GenericParameters)
                {
                    if (genparam.Constraints.Count > 0)
                    {
                        Write([email protected], ESpaceSurrounder.Both);
                        genparam.Accept(this);
                        VisitVisitableCollection(GENERIC_CONSTRAINT_LIST_START, String.Empty, BASIC_SEPARATOR, false, genparam.Constraints);
                    }
                }
            }
        }
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:21,代码来源:CSharpHelper.cs

示例2: WriteMethodSignature

        /// <summary>
        /// Write a method signature to the text buffer
        /// </summary>
        /// <param name="mdef">Method definition</param>
        protected override void WriteMethodSignature(MethodDefinition mdef)
        {
            mdef.Accept(this);

	        if (mdef.GenericParameters.Count <= 0) 
				return;
	        
			foreach (var genparam in mdef.GenericParameters.Where(genparam => genparam.Constraints.Count > 0))
			{
				Write([email protected], ESpaceSurrounder.Both);
				genparam.Accept(this);
				VisitVisitableCollection(GenericConstraintListStart, String.Empty, BasicSeparator, false, genparam.Constraints);
			}
        }
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:18,代码来源:CSharpHelper.cs

示例3: WriteMethodSignature

        /// <summary>
        /// Write a method signature to the text buffer
        /// </summary>
        /// <param name="mdef">Method definition</param>
        protected override void WriteMethodSignature(MethodDefinition mdef)
        {
            if (IsUnsafe(mdef))
            {
                WriteComment("This method is 'unsafe' and cannot be used in VB.NET");
                Write(Comment);
            }
            mdef.Accept(this);
	        
			if (mdef.ReturnType.FullName == typeof (void).FullName)
				return;
	        
			Write(EVisualBasicKeyword.As, ESpaceSurrounder.Both);
	        VisitTypeReference(mdef.ReturnType);
        }
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:19,代码来源:VisualBasicHelper.cs


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