cleanup code, added version to commandline interface, updated MSTest nuget packages.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace KattekerCreator.Helper
|
||||
{
|
||||
@ -9,17 +10,17 @@ namespace KattekerCreator.Helper
|
||||
|
||||
public static void WriteInfoLine(string text)
|
||||
{
|
||||
using (var c = new ConsoleWithOtherColor())
|
||||
using (new ConsoleWithOtherColor())
|
||||
{
|
||||
c.WriteLine($"{Info} [{DateTime.Now:G}] {text}");
|
||||
ConsoleWithOtherColor.WriteLine($"{Info} [{DateTime.Now:G}] {text}");
|
||||
}
|
||||
}
|
||||
|
||||
public static void WriteErrorLine(string text)
|
||||
{
|
||||
using (var c = new ConsoleWithOtherColor(ConsoleColor.DarkRed))
|
||||
using (new ConsoleWithOtherColor(ConsoleColor.DarkRed))
|
||||
{
|
||||
c.WriteLine($"{Error} [{DateTime.Now:G}] {text}");
|
||||
ConsoleWithOtherColor.WriteLine($"{Error} [{DateTime.Now:G}] {text}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,13 +39,20 @@ namespace KattekerCreator.Helper
|
||||
Console.ForegroundColor = color;
|
||||
}
|
||||
|
||||
public void WriteLine(string text)
|
||||
public static void WriteLine(string text)
|
||||
{
|
||||
Console.WriteLine(text);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposing) return;
|
||||
if (_defaultColor != null) Console.ForegroundColor = _defaultColor.Value;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user