mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
28 lines
815 B
C#
28 lines
815 B
C#
using System;
|
|
|
|
namespace Spectre.Console.Rendering
|
|
{
|
|
/// <summary>
|
|
/// Represents an old school ASCII border.
|
|
/// </summary>
|
|
public sealed class AsciiBoxBorder : BoxBorder
|
|
{
|
|
/// <inheritdoc/>
|
|
public override string GetPart(BoxBorderPart part)
|
|
{
|
|
return part switch
|
|
{
|
|
BoxBorderPart.TopLeft => "+",
|
|
BoxBorderPart.Top => "-",
|
|
BoxBorderPart.TopRight => "+",
|
|
BoxBorderPart.Left => "|",
|
|
BoxBorderPart.Right => "|",
|
|
BoxBorderPart.BottomLeft => "+",
|
|
BoxBorderPart.Bottom => "-",
|
|
BoxBorderPart.BottomRight => "+",
|
|
_ => throw new InvalidOperationException("Unknown border part."),
|
|
};
|
|
}
|
|
}
|
|
}
|