Restructure solution a bit

This commit is contained in:
Patrik Svensson
2020-09-09 08:43:48 +02:00
parent 003e15686f
commit 4f06687104
64 changed files with 221 additions and 199 deletions

View File

@@ -7,7 +7,7 @@ namespace Spectre.Console
/// <summary>
/// Represents color and text decoration.
/// </summary>
public sealed partial class Style : IEquatable<Style>
public sealed class Style : IEquatable<Style>
{
/// <summary>
/// Gets the foreground color.
@@ -48,6 +48,36 @@ namespace Spectre.Console
Decoration = decoration ?? Decoration.None;
}
/// <summary>
/// Creates a new style from the specified foreground color.
/// </summary>
/// <param name="color">The foreground color.</param>
/// <returns>A new <see cref="Style"/> with the specified foreground color.</returns>
public static Style WithForeground(Color color)
{
return new Style(foreground: color);
}
/// <summary>
/// Creates a new style from the specified background color.
/// </summary>
/// <param name="color">The background color.</param>
/// <returns>A new <see cref="Style"/> with the specified background color.</returns>
public static Style WithBackground(Color color)
{
return new Style(background: color);
}
/// <summary>
/// Creates a new style from the specified text decoration.
/// </summary>
/// <param name="decoration">The text decoration.</param>
/// <returns>A new <see cref="Style"/> with the specified text decoration.</returns>
public static Style WithDecoration(Decoration decoration)
{
return new Style(decoration: decoration);
}
/// <summary>
/// Creates a copy of the current <see cref="Style"/>.
/// </summary>