本文整理汇总了C#中ITextOutput.WriteRightBrace方法的典型用法代码示例。如果您正苦于以下问题:C# ITextOutput.WriteRightBrace方法的具体用法?C# ITextOutput.WriteRightBrace怎么用?C# ITextOutput.WriteRightBrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITextOutput
的用法示例。
在下文中一共展示了ITextOutput.WriteRightBrace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EndKeywordBlock
void EndKeywordBlock(ITextOutput output)
{
output.Unindent();
output.WriteRightBrace();
output.WriteLine();
}
示例2: WriteToolTip
void WriteToolTip(ITextOutput output, PropertyDef prop)
{
var sig = prop.PropertySig;
var md = prop.GetMethods.FirstOrDefault() ??
prop.SetMethods.FirstOrDefault() ??
prop.OtherMethods.FirstOrDefault();
var writer = new MethodWriter(this, output, md);
writer.WriteReturnType();
WriteToolTip(output, prop.DeclaringType);
output.Write('.', TextTokenType.Operator);
var ovrMeth = md == null || md.Overrides.Count == 0 ? null : md.Overrides[0].MethodDeclaration;
if (prop.IsIndexer()) {
if (ovrMeth != null) {
WriteToolTipType(output, ovrMeth.DeclaringType, false);
output.Write('.', TextTokenType.Operator);
}
output.Write("this", TextTokenType.Keyword);
writer.WriteGenericArguments();
writer.WriteMethodParameterList('[', ']');
}
else if (ovrMeth != null && GetPropName(ovrMeth) != null) {
WriteToolTipType(output, ovrMeth.DeclaringType, false);
output.Write('.', TextTokenType.Operator);
output.Write(IdentifierEscaper.Escape(GetPropName(ovrMeth)), TextTokenHelper.GetTextTokenType(prop));
}
else
output.Write(IdentifierEscaper.Escape(prop.Name), TextTokenHelper.GetTextTokenType(prop));
output.WriteSpace();
output.WriteLeftBrace();
if (prop.GetMethods.Count > 0) {
output.WriteSpace();
output.Write("get", TextTokenType.Keyword);
output.Write(';', TextTokenType.Operator);
}
if (prop.SetMethods.Count > 0) {
output.WriteSpace();
output.Write("set", TextTokenType.Keyword);
output.Write(';', TextTokenType.Operator);
}
output.WriteSpace();
output.WriteRightBrace();
}