From 0e865294db46aa779bb43906d70c9fbe75c26f6e Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 9 Jul 2013 17:48:04 +0100 Subject: [PATCH] Rename and change visibility of the StringBuilder instance in TextGenerator. --- src/Generator/Utils/TextGenerator.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Generator/Utils/TextGenerator.cs b/src/Generator/Utils/TextGenerator.cs index c4c435c5..ae199917 100644 --- a/src/Generator/Utils/TextGenerator.cs +++ b/src/Generator/Utils/TextGenerator.cs @@ -10,7 +10,7 @@ namespace CppSharp private const uint DefaultIndent = 4; private const uint MaxIndent = 80; - private readonly StringBuilder sb; + public StringBuilder stringBuilder; private bool isStartOfLine; private bool needsNewLine; @@ -18,7 +18,7 @@ namespace CppSharp public TextGenerator() { - sb = new StringBuilder(); + stringBuilder = new StringBuilder(); isStartOfLine = false; CurrentIndent = new Stack(); } @@ -34,12 +34,12 @@ namespace CppSharp foreach(var line in msg.SplitAndKeep(Environment.NewLine)) { if (isStartOfLine && !string.IsNullOrWhiteSpace(line)) - sb.Append(new string(' ', (int) CurrentIndent.Sum(u => u))); + stringBuilder.Append(new string(' ', (int) CurrentIndent.Sum(u => u))); if (line.Length > 0) isStartOfLine = line.EndsWith(Environment.NewLine); - sb.Append(line); + stringBuilder.Append(line); } } @@ -58,7 +58,7 @@ namespace CppSharp public void NewLine() { - sb.AppendLine(string.Empty); + stringBuilder.AppendLine(string.Empty); isStartOfLine = true; } @@ -104,7 +104,7 @@ namespace CppSharp public override string ToString() { - return sb.ToString(); + return stringBuilder.ToString(); } public static implicit operator string(TextGenerator tg)