本文整理汇总了C#中ITextOutput.WriteFilename方法的典型用法代码示例。如果您正苦于以下问题:C# ITextOutput.WriteFilename方法的具体用法?C# ITextOutput.WriteFilename怎么用?C# ITextOutput.WriteFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITextOutput
的用法示例。
在下文中一共展示了ITextOutput.WriteFilename方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateUI
void CreateUI(ITextOutput output, object o, bool includeNamespace)
{
var ns = o as NamespaceSearchResult;
if (ns != null) {
output.WriteNamespace(ns.Namespace);
return;
}
var td = o as TypeDef;
if (td != null) {
Debug.Assert(Language != null);
Language.TypeToString(output, td, includeNamespace);
return;
}
var md = o as MethodDef;
if (md != null) {
output.Write(IdentifierEscaper.Escape(md.Name), TextTokenHelper.GetTextTokenType(md));
return;
}
var fd = o as FieldDef;
if (fd != null) {
output.Write(IdentifierEscaper.Escape(fd.Name), TextTokenHelper.GetTextTokenType(fd));
return;
}
var pd = o as PropertyDef;
if (pd != null) {
output.Write(IdentifierEscaper.Escape(pd.Name), TextTokenHelper.GetTextTokenType(pd));
return;
}
var ed = o as EventDef;
if (ed != null) {
output.Write(IdentifierEscaper.Escape(ed.Name), TextTokenHelper.GetTextTokenType(ed));
return;
}
var asm = o as AssemblyDef;
if (asm != null) {
output.Write(asm);
return;
}
var mod = o as ModuleDef;
if (mod != null) {
output.WriteModule(mod.FullName);
return;
}
var asmRef = o as AssemblyRef;
if (asmRef != null) {
output.Write(asmRef);
return;
}
var modRef = o as ModuleRef;
if (modRef != null) {
output.WriteModule(modRef.FullName);
return;
}
// non-.NET file
var loadedAsm = o as LoadedAssembly;
if (loadedAsm != null) {
output.Write(loadedAsm.ShortName, TextTokenType.Text);
return;
}
var resNode = o as ResourceTreeNode;
if (resNode != null) {
output.WriteFilename(resNode.Name);
return;
}
var resElNode = o as ResourceElementTreeNode;
if (resElNode != null) {
output.WriteFilename(resElNode.Name);
return;
}
var s = o as string;
if (s != null) {
output.Write(s, TextTokenType.Text);
return;
}
Debug.Assert(s == null);
}
示例2: WriteManifestResourceInfo
void WriteManifestResourceInfo(ITextOutput output) {
output.WriteFilename(ReadStringsHeap(2));
}
示例3: Write
protected sealed override void Write(ITextOutput output, Language language) {
output.WriteFilename(r.Name);
}
示例4: WriteFileInfo
void WriteFileInfo(ITextOutput output) {
output.WriteFilename(ReadStringsHeap(1));
}