本文整理匯總了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);
}