mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-28 16:58:05 +01:00
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:
committed by
Patrik Svensson
parent
037a215a78
commit
041bd016a2
@@ -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 won’t 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user