Browse Source

Generate documentation blocks inside CodeGenerator.GenerateMultiLineComment.

pull/778/head
Joao Matos 9 years ago
parent
commit
123c45129e
  1. 7
      src/Generator/Generators/CodeGenerator.cs

7
src/Generator/Generators/CodeGenerator.cs

@ -127,7 +127,6 @@ namespace CppSharp.Generators
var lines = new List<string>(); var lines = new List<string>();
PushBlock(BlockKind.BlockComment);
if (comment.BriefText.Contains("\n")) if (comment.BriefText.Contains("\n"))
{ {
lines.Add("<summary>"); lines.Add("<summary>");
@ -140,14 +139,14 @@ namespace CppSharp.Generators
{ {
lines.Add($"<summary>{comment.BriefText}</summary>"); lines.Add($"<summary>{comment.BriefText}</summary>");
} }
PopBlock();
GenerateMultiLineComment(lines, CommentKind); GenerateMultiLineComment(lines, CommentKind);
PopBlock();
} }
public virtual void GenerateMultiLineComment(List<string> lines, CommentKind kind) public virtual void GenerateMultiLineComment(List<string> lines, CommentKind kind)
{ {
PushBlock(BlockKind.BlockComment);
var lineCommentPrologue = Comment.GetLineCommentPrologue(kind); var lineCommentPrologue = Comment.GetLineCommentPrologue(kind);
if (!string.IsNullOrWhiteSpace(lineCommentPrologue)) if (!string.IsNullOrWhiteSpace(lineCommentPrologue))
WriteLine("{0}", lineCommentPrologue); WriteLine("{0}", lineCommentPrologue);
@ -159,6 +158,8 @@ namespace CppSharp.Generators
var lineCommentEpilogue = Comment.GetLineCommentEpilogue(kind); var lineCommentEpilogue = Comment.GetLineCommentEpilogue(kind);
if (!string.IsNullOrWhiteSpace(lineCommentEpilogue)) if (!string.IsNullOrWhiteSpace(lineCommentEpilogue))
WriteLine("{0}", lineCommentEpilogue); WriteLine("{0}", lineCommentEpilogue);
PopBlock();
} }
#endregion #endregion

Loading…
Cancel
Save