Add convenience methods for writing values to the Console (#1)

* Remove IAnsiConsole.WriteLine
* Add WriteLine extensions for IAnsiConsole
* Add Write extensions for IAnsiConsole
* Add Write and WriteLine method for AnsiConsole
This commit is contained in:
Patrik Svensson
2020-07-23 13:19:24 +02:00
committed by Patrik Svensson
parent 36e2034a1c
commit 6a7733cabf
14 changed files with 1575 additions and 105 deletions

View File

@ -78,23 +78,5 @@ namespace Spectre.Console.Internal
Foreground,
Background));
}
public void WriteLine(string text)
{
if (text == null)
{
_out.WriteLine();
}
else
{
_out.WriteLine(
AnsiBuilder.GetAnsi(
_system,
text,
Style,
Foreground,
Background));
}
}
}
}

View File

@ -105,17 +105,5 @@ namespace Spectre.Console.Internal
{
_out.Write(text);
}
public void WriteLine(string text)
{
if (text == null)
{
_out.WriteLine();
}
else
{
_out.WriteLine(text);
}
}
}
}