2 using System.Collections.Generic;
9 public static class VSXmlDocu
11 public static Dictionary<string, string> TypeSummary =
new Dictionary<string, string>();
12 public static Dictionary<string, string> PropertySummary =
new Dictionary<string, string>();
13 public static Dictionary<string, string> PropertyValue =
new Dictionary<string, string>();
14 public static Dictionary<string, string> EnumSummary =
new Dictionary<string, string>();
22 private static string Unindent(
string S)
24 if (S.StartsWith(
"\r\n"))
29 for (
int i = 0; i < S.Length; i++)
31 if (S.Substring(i, 1) !=
" ")
40 string Spaces =
new string(
' ', L);
44 foreach (
string A
in S.Split(
'\n'))
46 X = A.Replace(
"\r",
"");
47 if (X.StartsWith(Spaces))
62 public static void Load()
64 XmlDocument doc =
new XmlDocument();
65 doc.Load(
@"DirectOutput.XML");
68 XmlNode docNode = null;
69 foreach (XmlNode N
in doc.ChildNodes)
72 if (N.Name ==
"doc")
break;
75 if (docNode == null)
return;
76 XmlNode membersNode = null;
77 foreach (XmlNode N
in docNode.ChildNodes)
80 if (N.Name ==
"members")
break;
83 if (membersNode == null)
return;
85 foreach (XmlNode M
in membersNode)
87 if (M.Attributes != null)
91 foreach (XmlAttribute A
in M.Attributes)
100 if (Name.StartsWith(
"T:"))
103 Name = Name.Substring(2);
105 foreach (XmlNode TChild
in M.ChildNodes)
110 TypeSummary.Add(Name, Unindent(TChild.InnerXml));
124 else if (Name.StartsWith(
"P:"))
127 Name = Name.Substring(2);
129 foreach (XmlNode TChild
in M.ChildNodes)
134 PropertySummary.Add(Name, Unindent(TChild.InnerXml));
137 PropertyValue.Add(Name, Unindent(TChild.InnerXml));
154 else if (Name.StartsWith(
"F:"))
156 Name = Name.Substring(2);
158 foreach (XmlNode TChild
in M.ChildNodes)
163 EnumSummary.Add(Name, Unindent(TChild.InnerXml));