Skip to content

Commit

Permalink
Remove summary tag when there is no doc
Browse files Browse the repository at this point in the history
  • Loading branch information
verdie-g committed Aug 23, 2019
1 parent dc76f8b commit fc84a41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions XmlSchemaClassGenerator.Tests/XmlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ namespace Test
using System.Xml.Serialization;
/// <summary>
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute(""Tests"", ""1.0.0.1"")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(""group-name"", Namespace="""")]
Expand All @@ -583,8 +581,6 @@ public partial class Group_Name
[System.Xml.Serialization.XmlTextAttribute()]
public string Value { get; set; }
/// <summary>
/// </summary>
[System.Xml.Serialization.XmlAttributeAttribute(""justify"", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public SimpleType Justify { get; set; }
Expand All @@ -596,16 +592,12 @@ public partial class Group_Name
public bool JustifySpecified { get; set; }
}
/// <summary>
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute(""Tests"", ""1.0.0.1"")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(""simpleType"", Namespace="""")]
public enum SimpleType
{
/// <summary>
/// </summary>
[System.Xml.Serialization.XmlEnumAttribute(""foo"")]
Foo,
}
Expand Down
4 changes: 2 additions & 2 deletions XmlSchemaClassGenerator/TypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public class DocumentationModel
public string Text { get; set; }
public static bool DisableComments { get; set; }

public static IEnumerable<CodeCommentStatement> GetComments(IEnumerable<DocumentationModel> docs)
public static IEnumerable<CodeCommentStatement> GetComments(IList<DocumentationModel> docs)
{
if (DisableComments)
if (DisableComments || docs.Count == 0)
yield break;

yield return new CodeCommentStatement("<summary>", true);
Expand Down

0 comments on commit fc84a41

Please sign in to comment.