本文整理汇总了C#中Method.AddToDoComment方法的典型用法代码示例。如果您正苦于以下问题:C# Method.AddToDoComment方法的具体用法?C# Method.AddToDoComment怎么用?C# Method.AddToDoComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Method
的用法示例。
在下文中一共展示了Method.AddToDoComment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryAddMemberAsMethod
/// <summary>
/// Tries to add member as a method.
/// </summary>
/// <param name="contractClass">The contract class.</param>
/// <param name="member">The member.</param>
/// <returns>
/// <c>true</c> if the member was a method and added; otherwise <c>false</c>
/// </returns>
private bool TryAddMemberAsMethod(Class contractClass, Member member)
{
Contract.Requires(contractClass != null, "contractClass is null.");
Contract.Requires(member != null, "member is null.");
var interfaceMethod = member as Method;
if (interfaceMethod == null)
{
return false;
}
var method = new Method();
this.SetupMemberDeclaration(method, interfaceMethod);
if (string.IsNullOrEmpty(interfaceMethod.MemberType) || interfaceMethod.MemberType == "void")
{
method.MethodType = MethodTypeEnum.Void;
}
else
{
method.MethodType = MethodTypeEnum.Function;
var typeReferenceExp = interfaceMethod.MemberTypeReference;
if (typeReferenceExp != null)
{
this.AddDefaultReturn(method, typeReferenceExp);
}
}
method.AddToDoComment();
method.CopyParameters(interfaceMethod);
contractClass.CloneDocComment(interfaceMethod);
contractClass.AddNode(method);
return true;
}