2 using System.Collections.Generic;
5 using System.Reflection;
7 namespace DocumentationHelper
21 if (VSXmlDocu.PropertySummary.ContainsKey(N))
23 return VSXmlDocu.PropertySummary[N];
35 if (VSXmlDocu.PropertyValue.ContainsKey(N))
37 return VSXmlDocu.PropertyValue[N];
47 S +=
"\\subsubsection {0}_{1}_{2} {2}\n\n".Build(
PropertyInfo.ReflectedType.Namespace.Replace(
".",
"_"),
PropertyInfo.ReflectedType.Name,
Name);
53 if (!
Value.IsNullOrWhiteSpace())
63 else if (!
Summary.IsNullOrWhiteSpace())
75 string N = GetNestedPropertiesDocu(
this);
76 if (!N.IsNullOrWhiteSpace())
78 S +=
"__Nested Properties__\n\n";
79 S +=
"The following nested propteries exist for {0}:\n".Build(
Name);
87 S +=
"__Valid values__\n\n";
102 string Indent =
new string(
' ', Level * 2);
104 L.Sort((PDD1, PDD2) => PDD1.Name.CompareTo(PDD2.Name));
109 S += Indent +
"* __{0}__<br/>".Build(PDD.
Name);
112 if (!PDD.
Value.IsNullOrWhiteSpace())
114 S += Indent +
" "+PDD.
Value;
122 else if (!PDD.
Summary.IsNullOrWhiteSpace())
124 S += Indent +
" " + PDD.
Summary;
127 string N = GetNestedPropertiesDocu(PDD, Level + 1);
128 if (!N.IsNullOrWhiteSpace())
130 S += Indent +
" This property has the following childs:\n";
171 S =
"The property {0} accepts the following values:\n\n".Build(
Name);
172 S +=
string.Join(
"\n* ", Enum.GetNames(
PropertyInfo.PropertyType));
185 List<PropertyDocuData> L =
new List<PropertyDocuData>();
190 Type ItemType =
PropertyInfo.PropertyType.GetGetGenericCollectionTypeArguments()[0];
191 foreach (
PropertyInfo PI
in ItemType.GetXMLSerializableProperties())
197 else if (
PropertyInfo.PropertyType.IsGenericDictionary())
199 throw new NotImplementedException();