Skip to content

Commit

Permalink
Add DiagnosticsBag.ToString
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Feb 10, 2019
1 parent d190334 commit e1d92d0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/SharpToml/Syntax/DiagnosticsBag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace SharpToml.Syntax
{
Expand Down Expand Up @@ -65,5 +66,17 @@ IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable) _messages).GetEnumerator();
}

public override string ToString()
{
var builder = new StringBuilder();
foreach (var message in _messages)
{
builder.AppendLine(message.ToString());
}

return builder.ToString();
}

}
}

0 comments on commit e1d92d0

Please sign in to comment.