本文整理汇总了C#中IDecompiler.WriteType方法的典型用法代码示例。如果您正苦于以下问题:C# IDecompiler.WriteType方法的具体用法?C# IDecompiler.WriteType怎么用?C# IDecompiler.WriteType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDecompiler
的用法示例。
在下文中一共展示了IDecompiler.WriteType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
protected override void Write(ITextColorWriter output, IDecompiler decompiler) {
if (hidesParent) {
output.Write(BoxedTextColor.Punctuation, "(");
output.Write(BoxedTextColor.Text, dnSpy_Analyzer_Resources.HidesParent);
output.Write(BoxedTextColor.Punctuation, ")");
output.WriteSpace();
}
decompiler.WriteType(output, analyzedProperty.DeclaringType, true);
output.Write(BoxedTextColor.Operator, ".");
new NodePrinter().Write(output, decompiler, analyzedProperty, Context.ShowToken, null);
}
示例2: Write
protected override void Write(ITextColorWriter output, IDecompiler decompiler) {
decompiler.WriteType(output, analyzedField.DeclaringType, true);
output.Write(BoxedTextColor.Operator, ".");
new NodePrinter().Write(output, decompiler, analyzedField, Context.ShowToken);
}
示例3: Write
/// <summary>
/// Writes a method
/// </summary>
/// <param name="output">Output</param>
/// <param name="decompiler">Decompiler</param>
/// <param name="method">Method</param>
/// <param name="showToken">true to write tokens</param>
public void Write(ITextColorWriter output, IDecompiler decompiler, MethodDef method, bool showToken) {
output.Write(decompiler.MetadataTextColorProvider.GetColor(method), NameUtilities.CleanIdentifier(method.Name));
output.Write(BoxedTextColor.Punctuation, "(");
foreach (var p in method.Parameters) {
if (p.IsHiddenThisParameter)
continue;
if (p.MethodSigIndex > 0)
output.WriteCommaSpace();
decompiler.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(BoxedTextColor.Operator, "...");
}
output.Write(BoxedTextColor.Punctuation, ")");
output.WriteSpace();
output.Write(BoxedTextColor.Punctuation, ":");
output.WriteSpace();
decompiler.WriteType(output, method.ReturnType.ToTypeDefOrRef(), false, method.Parameters.ReturnParameter.ParamDef);
WriteToken(output, method, showToken);
}