本文整理汇总了C#中Mono.Cecil.MethodReference.Accept方法的典型用法代码示例。如果您正苦于以下问题:C# MethodReference.Accept方法的具体用法?C# MethodReference.Accept怎么用?C# MethodReference.Accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Cecil.MethodReference
的用法示例。
在下文中一共展示了MethodReference.Accept方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteMethodSignature
/// <summary>
/// Write a method signature to the text buffer
/// </summary>
/// <param name="mref">Method reference</param>
protected override void WriteMethodSignature(MethodReference mref)
{
mref.Accept(this);
if (mref.GenericParameters.Count <= 0)
return;
foreach (var genparam in mref.GenericParameters.Where(genparam => genparam.Constraints.Count > 0))
{
Write([email protected], SpaceSurrounder.Both);
genparam.Accept(this);
VisitVisitableCollection(GenericConstraintListStart, String.Empty, BasicSeparator, false, genparam.Constraints);
}
}
示例2: WriteMethodSignature
/// <summary>
/// Write a method signature to the text buffer
/// </summary>
/// <param name="mref">Method reference</param>
protected override void WriteMethodSignature(MethodReference mref)
{
if (IsUnsafe(mref))
{
WriteComment("This method is 'unsafe' and cannot be used in VB.NET");
Write(Comment);
}
mref.Accept(this);
if (mref.ReturnType.FullName == typeof (void).FullName)
return;
Write(VisualBasicKeyword.As, SpaceSurrounder.Both);
VisitTypeReference(mref.ReturnType);
}