Browse Source

Merge pull request #449 from ddobrev/master

Extended the commenting of enum members to handle multi-line comments
pull/478/head
João Matos 10 years ago
parent
commit
e0140e2e1a
  1. 11
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

11
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -345,7 +345,18 @@ namespace CppSharp.Generators.CSharp @@ -345,7 +345,18 @@ namespace CppSharp.Generators.CSharp
return;
PushBlock(BlockKind.InlineComment);
if (comment.BriefText.Contains("\n"))
{
WriteLine("/// <summary>");
foreach (string line in HtmlEncoder.HtmlEncode(comment.BriefText).Split(
Environment.NewLine.ToCharArray()))
WriteLine("/// <para>{0}</para>", line);
WriteLine("/// </summary>");
}
else
{
WriteLine("/// <summary>{0}</summary>", comment.BriefText);
}
PopBlock();
}

Loading…
Cancel
Save