mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Fix the style parameter nullable annotation on AnsiConsoleExtensions
The style parameter is actually nullable. Also, the documentation of the style parameter has been made explicit that `Style.Plain` is used when a `null` style is passed.
This commit is contained in:

committed by
Patrik Svensson

parent
ffd24ec451
commit
786b7670da
@ -51,8 +51,8 @@ namespace Spectre.Console
|
||||
/// </summary>
|
||||
/// <param name="console">The console to write to.</param>
|
||||
/// <param name="text">The text to write.</param>
|
||||
/// <param name="style">The text style.</param>
|
||||
public static void Write(this IAnsiConsole console, string text, Style style)
|
||||
/// <param name="style">The text style or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
|
||||
public static void Write(this IAnsiConsole console, string text, Style? style)
|
||||
{
|
||||
if (console is null)
|
||||
{
|
||||
@ -91,8 +91,8 @@ namespace Spectre.Console
|
||||
/// </summary>
|
||||
/// <param name="console">The console to write to.</param>
|
||||
/// <param name="text">The text to write.</param>
|
||||
/// <param name="style">The text style.</param>
|
||||
public static void WriteLine(this IAnsiConsole console, string text, Style style)
|
||||
/// <param name="style">The text style or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
|
||||
public static void WriteLine(this IAnsiConsole console, string text, Style? style)
|
||||
{
|
||||
if (console is null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user