mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 21:38:16 +08:00
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:

committed by
Patrik Svensson

parent
36e2034a1c
commit
6a7733cabf
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user