本文整理汇总了C#中ISyntaxHighlightOutput.WriteSpace方法的典型用法代码示例。如果您正苦于以下问题:C# ISyntaxHighlightOutput.WriteSpace方法的具体用法?C# ISyntaxHighlightOutput.WriteSpace怎么用?C# ISyntaxHighlightOutput.WriteSpace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISyntaxHighlightOutput
的用法示例。
在下文中一共展示了ISyntaxHighlightOutput.WriteSpace方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
protected override void Write(ISyntaxHighlightOutput output) {
output.Write(string.Format("{0}", index + 1), TextTokenKind.Number);
if (infoTuple != null) {
output.WriteSpace();
output.Write("-", TextTokenKind.Operator);
output.WriteSpace();
infoTuple.Item2(output);
}
}
示例2: Write
protected override void Write(ISyntaxHighlightOutput output) {
output.Write(dnSpy_AsmEditor_Resources.HexNode_PE_Section, TextTokenKind.Keyword);
output.WriteSpace();
output.Write("#", TextTokenKind.Operator);
output.Write(sectionNumber.ToString(), TextTokenKind.Number);
output.Write(":", TextTokenKind.Operator);
output.WriteSpace();
output.Write(string.Format("{0}", imageSectionHeaderVM.NameVM.String), TextTokenKind.Type);
}
示例3: 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);
}
示例4: Write
public void Write(ISyntaxHighlightOutput output, ILanguage language, AssemblyDef asm, bool showToken, bool showAssemblyVersion, bool showAssemblyPublicKeyToken)
{
output.Write(asm.Name, IsExe(asm.ManifestModule) ? TextTokenKind.AssemblyExe : TextTokenKind.Assembly);
bool showAsmVer = showAssemblyVersion;
bool showPublicKeyToken = showAssemblyPublicKeyToken && !PublicKeyBase.IsNullOrEmpty2(asm.PublicKeyToken);
if (showAsmVer || showPublicKeyToken) {
output.WriteSpace();
output.Write("(", TextTokenKind.Operator);
bool needComma = false;
if (showAsmVer) {
if (needComma)
output.WriteCommaSpace();
needComma = true;
output.Write(asm.Version);
}
if (showPublicKeyToken) {
if (needComma)
output.WriteCommaSpace();
needComma = true;
var pkt = asm.PublicKeyToken;
if (PublicKeyBase.IsNullOrEmpty2(pkt))
output.Write("null", TextTokenKind.Keyword);
else
output.Write(pkt.ToString(), TextTokenKind.Number);
}
output.Write(")", TextTokenKind.Operator);
}
WriteToken(output, asm, showToken);
}
示例5: Write
protected override void Write(ISyntaxHighlightOutput output) {
output.Write(dnSpy_AsmEditor_Resources.HexNode_StorageStream, TextTokenKind.InstanceField);
output.WriteSpace();
output.Write("#", TextTokenKind.Operator);
output.Write(streamNumber.ToString(), TextTokenKind.Number);
output.Write(":", TextTokenKind.Operator);
output.WriteSpace();
output.Write(string.Format("{0}", storageStreamVM.RCNameVM.StringZ), storageStreamType == StorageStreamType.None ? TextTokenKind.Error : TextTokenKind.Type);
}
示例6: WriteToken
void WriteToken(ISyntaxHighlightOutput output, IMDTokenProvider tok, bool showToken)
{
if (!showToken)
return;
output.WriteSpace();
output.Write("@", TextTokenKind.Operator);
output.Write(string.Format("{0:X8}", tok.MDToken.Raw), TextTokenKind.Number);
}
示例7: Write
protected override void Write(ISyntaxHighlightOutput output) {
output.Write(string.Format("{0:X2}", (byte)tablesStreamVM.Table), TextTokenKind.Number);
output.WriteSpace();
output.Write(string.Format("{0}", tablesStreamVM.Table), TextTokenKind.Type);
output.WriteSpace();
output.Write("(", TextTokenKind.Operator);
output.Write(string.Format("{0}", tablesStreamVM.Rows), TextTokenKind.Number);
output.Write(")", TextTokenKind.Operator);
}
示例8: WriteNamespaceName
void WriteNamespaceName(ISyntaxHighlightOutput output, int nsIndex, int nameIndex) {
var ns = ReadStringsHeap(nsIndex);
var name = ReadStringsHeap(nameIndex);
output.Write(name, TextTokenKind.Type);
if (!string.IsNullOrEmpty(ns)) {
output.WriteSpace();
output.Write("-", TextTokenKind.Operator);
output.WriteSpace();
var parts = ns.Split('.');
for (int i = 0; i < parts.Length; i++) {
output.Write(parts[i], TextTokenKind.NamespacePart);
if (i + 1 < parts.Length)
output.Write(".", TextTokenKind.Operator);
}
}
}