Skip to content

Commit 3c7368d

Browse files
author
Stephan
committed
Merge origin/master into master
2 parents aabc675 + b638246 commit 3c7368d

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

Zbu.ModelsBuilder/Building/TextBuilder.cs

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,21 @@ private void WriteContentTypeProperties(StringBuilder sb, TypeModel type)
231231
private void WriteMixinProperty(StringBuilder sb, PropertyModel property, string mixinClrName)
232232
{
233233
sb.Append("\n");
234+
235+
// Adds xml summary to each property containing
236+
// property name and property description
237+
if (!string.IsNullOrWhiteSpace(property.Name) || !string.IsNullOrWhiteSpace(property.Description))
238+
{
239+
sb.Append("\t\t///<summary>\n");
234240

235-
if (!string.IsNullOrWhiteSpace(property.Name))
236-
sb.AppendFormat("\t\t/// <summary>{0}</summary>\n", XmlCommentString(property.Name));
241+
if (!string.IsNullOrWhiteSpace(property.Name))
242+
sb.AppendFormat("\t\t///{0}\n", XmlCommentString(property.Name));
243+
244+
if (!string.IsNullOrWhiteSpace(property.Description))
245+
sb.AppendFormat("\t\t///{0}\n", XmlCommentString(property.Description));
246+
247+
sb.Append("\t\t///</summary>\n");
248+
}
237249

238250
sb.AppendFormat("\t\t[ImplementPropertyType(\"{0}\")]\n", property.Alias);
239251

@@ -253,9 +265,21 @@ private void WriteProperty(StringBuilder sb, TypeModel type, PropertyModel prope
253265
var mixinStatic = mixinClrName != null;
254266

255267
sb.Append("\n");
268+
269+
// Adds xml summary to each property containing
270+
// property name and property description
271+
if (!string.IsNullOrWhiteSpace(property.Name) || !string.IsNullOrWhiteSpace(property.Description))
272+
{
273+
sb.Append("\t\t///<summary>\n");
256274

257-
if (!string.IsNullOrWhiteSpace(property.Name))
258-
sb.AppendFormat("\t\t/// <summary>{0}</summary>\n", XmlCommentString(property.Name));
275+
if (!string.IsNullOrWhiteSpace(property.Name))
276+
sb.AppendFormat("\t\t///{0}\n", XmlCommentString(property.Name));
277+
278+
if (!string.IsNullOrWhiteSpace(property.Description))
279+
sb.AppendFormat("\t\t///{0}\n", XmlCommentString(property.Description));
280+
281+
sb.Append("\t\t///</summary>\n");
282+
}
259283

260284
sb.AppendFormat("\t\t[ImplementPropertyType(\"{0}\")]\n", property.Alias);
261285

0 commit comments

Comments
 (0)