Bring Host build into separate project

This commit is contained in:
Bryan 2016-05-11 17:20:40 -07:00 committed by Eric Erhardt
parent 07b785c183
commit 7bf08c5bd5
76 changed files with 1065 additions and 320 deletions

View file

@ -0,0 +1,30 @@
using System;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public static class BuildReporter
{
private const string TimeSpanFormat = @"hh\:mm\:ss\.fff";
private static DateTime _initialTime = DateTime.Now;
public static void BeginSection(string type, string name)
{
Reporter.Output.WriteLine($"[{type.PadRight(10)} >]".Green() + $" [....] [{(DateTime.Now - _initialTime).ToString(TimeSpanFormat)}]".Blue() + $" {name}");
}
public static void EndSection(string type, string name, bool success)
{
var header = $"[{type.PadRight(10)} <]";
if(success)
{
header = header.Green();
}
else
{
header = header.Red();
}
var successString = success ? " OK " : "FAIL";
Reporter.Output.WriteLine(header + $" [{successString}] [{(DateTime.Now - _initialTime).ToString(TimeSpanFormat)}]".Blue() + $" {name}");
}
}
}