private string GetNestedPropertiesDocu(PropertyDocuData PDDP, int Level = 0) { string S = ""; string Indent = new string(' ', Level * 2); List <PropertyDocuData> L = PDDP.ChildPropertyDocuDataList; L.Sort((PDD1, PDD2) => PDD1.Name.CompareTo(PDD2.Name)); if (L.Count > 0) { foreach (PropertyDocuData PDD in L) { S += Indent + "* __{0}__<br/>".Build(PDD.Name); if (!PDD.Value.IsNullOrWhiteSpace() || !PDD.ValidValuesDescription.IsNullOrWhiteSpace()) { if (!PDD.Value.IsNullOrWhiteSpace()) { S += Indent + " " + PDD.Value; S += "\n\n"; } ; if (!PDD.ValidValuesDescription.IsNullOrWhiteSpace()) { S += Indent + " " + PDD.ValidValuesDescription + "\n\n"; } } else if (!PDD.Summary.IsNullOrWhiteSpace()) { S += Indent + " " + PDD.Summary; S += "\n\n"; } string N = GetNestedPropertiesDocu(PDD, Level + 1); if (!N.IsNullOrWhiteSpace()) { S += Indent + " This property has the following childs:\n"; S += N; } } } return(S); }
private string GetNestedPropertiesDocu(PropertyDocuData PDDP, int Level = 0) { string S = ""; string Indent = new string(' ', Level * 2); List<PropertyDocuData> L = PDDP.ChildPropertyDocuDataList; L.Sort((PDD1, PDD2) => PDD1.Name.CompareTo(PDD2.Name)); if (L.Count > 0) { foreach (PropertyDocuData PDD in L) { S += Indent + "* __{0}__<br/>".Build(PDD.Name); if (!PDD.Value.IsNullOrWhiteSpace() || !PDD.ValidValuesDescription.IsNullOrWhiteSpace()) { if (!PDD.Value.IsNullOrWhiteSpace()) { S += Indent + " "+PDD.Value; S += "\n\n"; }; if (!PDD.ValidValuesDescription.IsNullOrWhiteSpace()) { S += Indent + " " + PDD.ValidValuesDescription + "\n\n"; } } else if (!PDD.Summary.IsNullOrWhiteSpace()) { S += Indent + " " + PDD.Summary; S += "\n\n"; } string N = GetNestedPropertiesDocu(PDD, Level + 1); if (!N.IsNullOrWhiteSpace()) { S += Indent + " This property has the following childs:\n"; S += N; } } } return S; }