namespace InnovEnergy.SysTools.Utils; internal static class ConsoleUtils { public static T WriteLine(this T t, ConsoleColor color) { var c = Console.ForegroundColor; Console.ForegroundColor = color; Console.WriteLine(t); Console.ForegroundColor = c; return t; } public static T WriteLine(this T t) { Console.WriteLine(t); return t; } public static T WriteLine(this T t, ConsoleColor color, params String[] more) { var c = Console.ForegroundColor; Console.ForegroundColor = color; Console.WriteLine(t + " " + more.JoinWith(" ")); Console.ForegroundColor = c; return t; } public static T WriteLine(this T t, params String[] more) { Console.WriteLine(t + " " + more.JoinWith(" ")); return t; } public static T Write(this T t, ConsoleColor color) { var c = Console.ForegroundColor; Console.ForegroundColor = color; Console.Write(t); Console.ForegroundColor = c; return t; } public static T Write(this T t) { Console.Write(t); return t; } public static T Write(this T t, ConsoleColor color, params String[] more) { var c = Console.ForegroundColor; Console.ForegroundColor = color; Console.Write(t + " " + more.JoinWith(" ")); Console.ForegroundColor = c; return t; } public static T Write(this T t, params String[] more) { Console.Write(t + " " + more.JoinWith(" ")); return t; } }