本文整理汇总了C#中Monodoc.HelpSource.PackXml方法的典型用法代码示例。如果您正苦于以下问题:C# HelpSource.PackXml方法的具体用法?C# HelpSource.PackXml怎么用?C# HelpSource.PackXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Monodoc.HelpSource
的用法示例。
在下文中一共展示了HelpSource.PackXml方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CloseTree
//
// Packs a file with the summary data
//
public override void CloseTree (HelpSource hs, Tree tree)
{
foreach (DictionaryEntry de in class_summaries){
XmlDocument doc = new XmlDocument ();
string ns = (string) de.Key;
ArrayList list = (ArrayList) de.Value;
list.Sort();
XmlElement elements = doc.CreateElement ("elements");
doc.AppendChild (elements);
if (namespace_summaries [ns] != null)
elements.AppendChild (doc.ImportNode ((XmlNode)namespace_summaries [ns],true));
else
elements.AppendChild (doc.CreateElement("summary"));
if (namespace_remarks [ns] != null)
elements.AppendChild (doc.ImportNode ((XmlNode)namespace_remarks [ns],true));
else
elements.AppendChild (doc.CreateElement("remarks"));
hs.Message (TraceLevel.Info, "Have {0} elements in the {1}", list.Count, ns);
foreach (TypeInfo p in list){
XmlElement e = null;
switch (p.type_kind){
case "Class":
e = doc.CreateElement ("class");
break;
case "Enumeration":
e = doc.CreateElement ("enum");
break;
case "Structure":
e = doc.CreateElement ("struct");
break;
case "Delegate":
e = doc.CreateElement ("delegate");
break;
case "Interface":
e = doc.CreateElement ("interface");
break;
}
e.SetAttribute ("name", p.type_name);
e.SetAttribute ("fullname", p.type_full);
e.SetAttribute ("assembly", p.type_assembly);
XmlNode copy = doc.ImportNode (p.type_doc, true);
e.AppendChild (copy);
elements.AppendChild (e);
}
hs.PackXml ("xml.summary." + ns, doc,(string) namespace_realpath[ns]);
}
XmlDocument nsSummary = new XmlDocument ();
XmlElement root = nsSummary.CreateElement ("elements");
nsSummary.AppendChild (root);
foreach (DictionaryEntry de in namespace_summaries) {
XmlNode n = (XmlNode)de.Value;
XmlElement summary = nsSummary.CreateElement ("namespace");
summary.SetAttribute ("ns", (string)de.Key);
root.AppendChild (summary);
if (n != null)
summary.AppendChild (nsSummary.ImportNode (n,true));
else
summary.AppendChild (nsSummary.CreateElement("summary"));
}
tree.HelpSource.PackXml ("mastersummary.xml", nsSummary, null);
AddExtensionMethods (tree);
AddImageFiles (hs, tree);
}