Remove verbs from extension methods

Removed the verbs from all extension methods that manipulate
properties which makes the API more succinct and easier to read.

Also added implicit conversion from string to Style.

As a good OSS citizen, I've obsoleted the old methods with
a warning for now, so this shouldn't break anyone using
the old methods.
This commit is contained in:
Patrik Svensson
2020-10-22 00:32:07 +02:00
committed by Patrik Svensson
parent 037a215a78
commit 041bd016a2
53 changed files with 1021 additions and 245 deletions

View File

@@ -1,5 +1,3 @@
using System;
namespace Spectre.Console
{
/// <summary>
@@ -23,16 +21,5 @@ namespace Spectre.Console
.Replace("[", "[[")
.Replace("]", "]]");
}
/// <summary>
/// Escapes text so that it wont be interpreted as markup.
/// </summary>
/// <param name="text">The text to escape.</param>
/// <returns>A string that is safe to use in markup.</returns>
[Obsolete("Use EscapeMarkup extension instead.", false)]
public static string SafeMarkup(this string text)
{
return EscapeMarkup(text);
}
}
}