From b17eabaa1f67210da8992531d90382277bc116b8 Mon Sep 17 00:00:00 2001 From: Phil Scott Date: Sun, 21 Mar 2021 22:26:02 -0400 Subject: [PATCH] Adds helper overloads for Markup calls without args Without specific overloads without the args string.format will get called even if it's not needed. This closes #309 --- src/Spectre.Console/AnsiConsole.Markup.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Spectre.Console/AnsiConsole.Markup.cs b/src/Spectre.Console/AnsiConsole.Markup.cs index 9f89d37..ab7e1d6 100644 --- a/src/Spectre.Console/AnsiConsole.Markup.cs +++ b/src/Spectre.Console/AnsiConsole.Markup.cs @@ -7,6 +7,15 @@ namespace Spectre.Console /// public static partial class AnsiConsole { + /// + /// Writes the specified markup to the console. + /// + /// The value to write. + public static void Markup(string value) + { + Console.Markup(value); + } + /// /// Writes the specified markup to the console. /// @@ -28,6 +37,15 @@ namespace Spectre.Console Console.Markup(provider, format, args); } + /// + /// Writes the specified markup, followed by the current line terminator, to the console. + /// + /// The value to write. + public static void MarkupLine(string value) + { + Console.MarkupLine(value); + } + /// /// Writes the specified markup, followed by the current line terminator, to the console. ///