You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
941 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DockerFileBuildHelper
{
public class StringBuilderEx
{
StringBuilder _Builder = new StringBuilder();
public StringBuilderEx()
{
}
public int Indent { get; set; }
public void Append(string str)
{
_Builder.Append(GetIndents());
_Builder.Append(str);
}
private string GetIndents()
{
return new String(Enumerable.Range(0, Indent).Select(_ => '\t').ToArray());
}
public void AppendLine(string str)
{
_Builder.Append(GetIndents());
_Builder.AppendLine(str);
}
public override string ToString()
{
return _Builder.ToString();
}
internal void AppendLine()
{
_Builder.AppendLine();
}
}
}