Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the style parameter nullable annotation on AnsiConsoleExtensions #527

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Spectre.Console/Extensions/AnsiConsoleExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public static void Write(this IAnsiConsole console, string text)
/// </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)
{
Expand Down Expand Up @@ -91,8 +91,8 @@ public static void WriteLine(this IAnsiConsole console, string text)
/// </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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Spectre.Console/Widgets/Paragraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Paragraph()
/// Initializes a new instance of the <see cref="Paragraph"/> class.
/// </summary>
/// <param name="text">The text.</param>
/// <param name="style">The style of the text.</param>
/// <param name="style">The style of the text or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
public Paragraph(string text, Style? style = null)
: this()
{
Expand All @@ -63,7 +63,7 @@ public Paragraph(string text, Style? style = null)
/// Appends some text to this paragraph.
/// </summary>
/// <param name="text">The text to append.</param>
/// <param name="style">The style of the appended text.</param>
/// <param name="style">The style of the appended text or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
/// <returns>The same instance so that multiple calls can be chained.</returns>
public Paragraph Append(string text, Style? style = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Spectre.Console/Widgets/Text.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed class Text : Renderable, IAlignable, IOverflowable
/// Initializes a new instance of the <see cref="Text"/> class.
/// </summary>
/// <param name="text">The text.</param>
/// <param name="style">The style of the text.</param>
/// <param name="style">The style of the text or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
public Text(string text, Style? style = null)
{
_paragraph = new Paragraph(text, style);
Expand Down