本文整理汇总了C#中ITextOutput.WriteNamespace方法的典型用法代码示例。如果您正苦于以下问题:C# ITextOutput.WriteNamespace方法的具体用法?C# ITextOutput.WriteNamespace怎么用?C# ITextOutput.WriteNamespace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITextOutput
的用法示例。
在下文中一共展示了ITextOutput.WriteNamespace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
protected override void Write(ITextOutput output, Language language) {
output.WriteNamespace(name);
}
示例2: 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);
}