public void Handle(IConsoleOperations console, IErrorAdapter error) { console.WriteLine("Coloured".Red() + " text is " + "easy".Yellow() + " to configure."); console.WriteLine(); console.WriteLine("For example:"); console.WriteLine(); console.WriteLine(@" ""red on green"".Red().BGDarkGreen()"); console.WriteLine(); console.WriteLine("Displays like this:"); console.WriteLine(); console.WriteLine("red on green".Red().BGGreen()); console.WriteLine(); console.WriteLine("It's".Cyan() + "easy".BGYellow().Black() + "to".BGDarkCyan().Cyan() + "overuse".BGDarkBlue().White() + "it!".Magenta().BGGray()); console.WriteLine(); console.WriteLine(); var data = Enumerable.Range(1, 10) .Select(i => new { Number = i, String = string.Join(" ", Enumerable.Repeat("blah", i)).Cyan(), Red = (("Red" + Environment.NewLine + "Lines").Cyan() + Environment.NewLine + "lines").BGDarkRed() + "Clear", Wrapped = @"Complex data string. Includes a hard newline.".Yellow() }); console.FormatTable(data); error.WriteLine("This is " + "error".Red() + " text"); }
public void Handle(IConsoleAdapter console, Options command, IErrorAdapter error) { console.WriteLine("Text from handler class."); error.WriteLine("Error text"); }