DocSpace-buildtools/common/ASC.Textile/StringBuilderTextileFormatter.cs

52 lines
1.1 KiB
C#
Raw Normal View History

2019-08-19 12:35:39 +00:00
#region License Statement
// Copyright (c) L.A.B.Soft. All rights reserved.
//
// The use and distribution terms for this software are covered by the
// Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
// which can be found in the file CPL.TXT at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by
// the terms of this license.
//
// You must not remove this notice, or any other, from this software.
#endregion
2022-02-17 09:08:01 +00:00
namespace Textile;
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
public class StringBuilderTextileFormatter : IOutputter
{
private StringBuilder _stringBuilder = null;
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
public StringBuilderTextileFormatter()
{
}
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
public string GetFormattedText()
{
return _stringBuilder.ToString();
}
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
#region IOutputter Members
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
public void Begin()
{
_stringBuilder = new StringBuilder();
}
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
public void End()
{
}
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
public void Write(string text)
{
_stringBuilder.Append(text);
}
2019-08-19 12:35:39 +00:00
2022-02-17 09:08:01 +00:00
public void WriteLine(string line)
{
_stringBuilder.AppendLine(line);
2019-08-19 12:35:39 +00:00
}
2022-02-17 09:08:01 +00:00
#endregion
2019-08-19 12:35:39 +00:00
}