public ProjectController( string solutionDirPath, string targetProjectFile) { _proj = new Project(solutionDirPath, targetProjectFile); _output = new StandardConsoleWriterCollection(); }
public static void WriteHeader( string headerText, IConsolidatedStringWriterCollection output, int totalWidth = 100, int topBottomMargin = 1) { var margin = (totalWidth - headerText.Length) / 2; headerText = string.Format("{0}{1}{0}", string.Empty.PadLeft(margin, ' '), headerText); var headerFooter = string.Empty.PadLeft(topBottomMargin, '\r'); var bar = string.Empty.PadLeft(headerText.Length + 2, '-'); output.Accent2.WriteLine(headerFooter); output.Accent2.WriteLine(bar); output.Standard.WriteLine("|{0}|", headerText); output.Accent2.WriteLine(bar); output.Accent2.WriteLine(headerFooter); }
/// <summary> /// Initializes a new instance of the <see cref="ConsoleBuildLogger"/> class. /// </summary> /// <param name="level">The log level</param> /// <param name="output">Output writer collection</param> public ConsoleBuildLogger(IConsolidatedStringWriterCollection output, LogLevel level = LogLevel.Info) { _level = level; _output = output ?? new NullConsolidatedStringWriterCollection(); }