本文整理汇总了C#中ILanguage.WriteType方法的典型用法代码示例。如果您正苦于以下问题:C# ILanguage.WriteType方法的具体用法?C# ILanguage.WriteType怎么用?C# ILanguage.WriteType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILanguage
的用法示例。
在下文中一共展示了ILanguage.WriteType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
protected override void Write(ISyntaxHighlightOutput output, ILanguage language) {
if (hidesParent) {
output.Write("(", TextTokenKind.Operator);
output.Write(dnSpy_Analyzer_Resources.HidesParent, TextTokenKind.Text);
output.Write(")", TextTokenKind.Operator);
output.WriteSpace();
}
language.WriteType(output, analyzedMethod.DeclaringType, true);
output.Write(".", TextTokenKind.Operator);
new NodePrinter().Write(output, language, analyzedMethod, Context.ShowToken);
}
示例2: Write
protected override void Write(ISyntaxHighlightOutput output, ILanguage language) {
language.WriteType(output, analyzedField.DeclaringType, true);
output.Write(".", TextTokenKind.Operator);
new NodePrinter().Write(output, language, analyzedField, Context.ShowToken);
}
示例3: Write
public void Write(ISyntaxHighlightOutput output, ILanguage language, MethodDef method, bool showToken)
{
output.Write(NameUtils.CleanIdentifier(method.Name), TextTokenKindUtils.GetTextTokenType(method));
output.Write("(", TextTokenKind.Operator);
foreach (var p in method.Parameters) {
if (p.IsHiddenThisParameter)
continue;
if (p.MethodSigIndex > 0)
output.WriteCommaSpace();
language.WriteType(output, p.Type.ToTypeDefOrRef(), false, p.ParamDef);
}
if (method.CallingConvention == CallingConvention.VarArg || method.CallingConvention == CallingConvention.NativeVarArg) {
if (method.MethodSig.GetParamCount() > 0)
output.WriteCommaSpace();
output.Write("...", TextTokenKind.Operator);
}
output.Write(")", TextTokenKind.Operator);
output.WriteSpace();
output.Write(":", TextTokenKind.Operator);
output.WriteSpace();
language.WriteType(output, method.ReturnType.ToTypeDefOrRef(), false, method.Parameters.ReturnParameter.ParamDef);
WriteToken(output, method, showToken);
}