private static DocLoader CreateDocLoader (XmlDocument overview)
{
Hashtable docs = new Hashtable ();
DocLoader loader = delegate (string s) {
XmlDocument d = null;
if (!docs.ContainsKey (s)) {
foreach (XmlNode n in overview.SelectNodes ("//Type")) {
string ns = n.ParentNode.Attributes ["Name"].Value;
string t = n.Attributes ["Name"].Value;
string sd = n.Attributes ["SourceDirectory"].Value;
if (s == ns + "." + t.Replace ("+", ".")) {
string f = CombinePath (sd, ns, t + ".xml");
if (File.Exists (f)) {
d = new XmlDocument ();
d.Load (f);
}
docs.Add (s, d);
break;
}
}
}
else
d = (XmlDocument) docs [s];
return d;
};
return loader;
}