mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 18:40:50 +08:00 
			
		
		
		
	Use file scoped namespace declarations
This commit is contained in:
		
				
					committed by
					
						
						Phil Scott
					
				
			
			
				
	
			
			
			
						parent
						
							1dbaf50935
						
					
				
				
					commit
					ec1188b837
				
			@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents another old school ASCII border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class Ascii2TableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents another old school ASCII border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class Ascii2TableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "+",
 | 
			
		||||
                TableBorderPart.HeaderTop => "-",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "+",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "+",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
                TableBorderPart.HeaderRight => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "-",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "+",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
                TableBorderPart.CellLeft => "|",
 | 
			
		||||
                TableBorderPart.CellSeparator => "|",
 | 
			
		||||
                TableBorderPart.CellRight => "|",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "|",
 | 
			
		||||
                TableBorderPart.FooterTop => "-",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "+",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "|",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "+",
 | 
			
		||||
                TableBorderPart.FooterBottom => "-",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "+",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "+",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "+",
 | 
			
		||||
            TableBorderPart.HeaderTop => "-",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "+",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "+",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
            TableBorderPart.HeaderRight => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "-",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "+",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
            TableBorderPart.CellLeft => "|",
 | 
			
		||||
            TableBorderPart.CellSeparator => "|",
 | 
			
		||||
            TableBorderPart.CellRight => "|",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "|",
 | 
			
		||||
            TableBorderPart.FooterTop => "-",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "+",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "|",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "+",
 | 
			
		||||
            TableBorderPart.FooterBottom => "-",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "+",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "+",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents an old school ASCII border with a double header border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class AsciiDoubleHeadTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents an old school ASCII border with a double header border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class AsciiDoubleHeadTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "+",
 | 
			
		||||
                TableBorderPart.HeaderTop => "-",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "+",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "+",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
                TableBorderPart.HeaderRight => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "=",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "+",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
                TableBorderPart.CellLeft => "|",
 | 
			
		||||
                TableBorderPart.CellSeparator => "|",
 | 
			
		||||
                TableBorderPart.CellRight => "|",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "+",
 | 
			
		||||
                TableBorderPart.FooterTop => "-",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "+",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "+",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "+",
 | 
			
		||||
                TableBorderPart.FooterBottom => "-",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "+",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "+",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "+",
 | 
			
		||||
            TableBorderPart.HeaderTop => "-",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "+",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "+",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
            TableBorderPart.HeaderRight => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "=",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "+",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
            TableBorderPart.CellLeft => "|",
 | 
			
		||||
            TableBorderPart.CellSeparator => "|",
 | 
			
		||||
            TableBorderPart.CellRight => "|",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "+",
 | 
			
		||||
            TableBorderPart.FooterTop => "-",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "+",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "+",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "+",
 | 
			
		||||
            TableBorderPart.FooterBottom => "-",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "+",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "+",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents an old school ASCII border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class AsciiTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents an old school ASCII border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class AsciiTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "+",
 | 
			
		||||
                TableBorderPart.HeaderTop => "-",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "-",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "+",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
                TableBorderPart.HeaderRight => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "-",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "+",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
                TableBorderPart.CellLeft => "|",
 | 
			
		||||
                TableBorderPart.CellSeparator => "|",
 | 
			
		||||
                TableBorderPart.CellRight => "|",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "|",
 | 
			
		||||
                TableBorderPart.FooterTop => "-",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "+",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "|",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "+",
 | 
			
		||||
                TableBorderPart.FooterBottom => "-",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "-",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "+",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "+",
 | 
			
		||||
            TableBorderPart.HeaderTop => "-",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "-",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "+",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
            TableBorderPart.HeaderRight => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "-",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "+",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
            TableBorderPart.CellLeft => "|",
 | 
			
		||||
            TableBorderPart.CellSeparator => "|",
 | 
			
		||||
            TableBorderPart.CellRight => "|",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "|",
 | 
			
		||||
            TableBorderPart.FooterTop => "-",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "+",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "|",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "+",
 | 
			
		||||
            TableBorderPart.FooterBottom => "-",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "-",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "+",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a border with a double edge.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class DoubleEdgeTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a border with a double edge.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class DoubleEdgeTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "╔",
 | 
			
		||||
                TableBorderPart.HeaderTop => "═",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "╤",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "╗",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "║",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
                TableBorderPart.HeaderRight => "║",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "╟",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "╢",
 | 
			
		||||
                TableBorderPart.CellLeft => "║",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => "║",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "╟",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "╢",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "╚",
 | 
			
		||||
                TableBorderPart.FooterBottom => "═",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "╧",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "╝",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "╔",
 | 
			
		||||
            TableBorderPart.HeaderTop => "═",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "╤",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "╗",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "║",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
            TableBorderPart.HeaderRight => "║",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "╟",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "╢",
 | 
			
		||||
            TableBorderPart.CellLeft => "║",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => "║",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "╟",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "╢",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "╚",
 | 
			
		||||
            TableBorderPart.FooterBottom => "═",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "╧",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "╝",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a double border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class DoubleTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a double border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class DoubleTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "╔",
 | 
			
		||||
                TableBorderPart.HeaderTop => "═",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "╦",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "╗",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "║",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "║",
 | 
			
		||||
                TableBorderPart.HeaderRight => "║",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "╠",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "═",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "╬",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "╣",
 | 
			
		||||
                TableBorderPart.CellLeft => "║",
 | 
			
		||||
                TableBorderPart.CellSeparator => "║",
 | 
			
		||||
                TableBorderPart.CellRight => "║",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "╠",
 | 
			
		||||
                TableBorderPart.FooterTop => "═",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "╬",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "╣",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "╚",
 | 
			
		||||
                TableBorderPart.FooterBottom => "═",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "╩",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "╝",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "╔",
 | 
			
		||||
            TableBorderPart.HeaderTop => "═",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "╦",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "╗",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "║",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "║",
 | 
			
		||||
            TableBorderPart.HeaderRight => "║",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "╠",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "═",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "╬",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "╣",
 | 
			
		||||
            TableBorderPart.CellLeft => "║",
 | 
			
		||||
            TableBorderPart.CellSeparator => "║",
 | 
			
		||||
            TableBorderPart.CellRight => "║",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "╠",
 | 
			
		||||
            TableBorderPart.FooterTop => "═",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "╬",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "╣",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "╚",
 | 
			
		||||
            TableBorderPart.FooterBottom => "═",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "╩",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "╝",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,44 +1,43 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a border with a heavy edge.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class HeavyEdgeTableBorder : TableBorder
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a border with a heavy edge.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class HeavyEdgeTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "┏",
 | 
			
		||||
                TableBorderPart.HeaderTop => "━",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "┯",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "┓",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "┃",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
                TableBorderPart.HeaderRight => "┃",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "┠",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "┨",
 | 
			
		||||
                TableBorderPart.CellLeft => "┃",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => "┃",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "┠",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "┨",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "┗",
 | 
			
		||||
                TableBorderPart.FooterBottom => "━",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "┷",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "┛",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "┏",
 | 
			
		||||
            TableBorderPart.HeaderTop => "━",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "┯",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "┓",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "┃",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
            TableBorderPart.HeaderRight => "┃",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "┠",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "┨",
 | 
			
		||||
            TableBorderPart.CellLeft => "┃",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => "┃",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "┠",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "┨",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "┗",
 | 
			
		||||
            TableBorderPart.FooterBottom => "━",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "┷",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "┛",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,44 +1,43 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a border with a heavy header.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class HeavyHeadTableBorder : TableBorder
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a border with a heavy header.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class HeavyHeadTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "┏",
 | 
			
		||||
                TableBorderPart.HeaderTop => "━",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "┳",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "┓",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "┃",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "┃",
 | 
			
		||||
                TableBorderPart.HeaderRight => "┃",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "┡",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "╇",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "┩",
 | 
			
		||||
                TableBorderPart.CellLeft => "│",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => "│",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "├",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "┤",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "└",
 | 
			
		||||
                TableBorderPart.FooterBottom => "─",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "┴",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "┘",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "┏",
 | 
			
		||||
            TableBorderPart.HeaderTop => "━",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "┳",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "┓",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "┃",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "┃",
 | 
			
		||||
            TableBorderPart.HeaderRight => "┃",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "┡",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "╇",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "┩",
 | 
			
		||||
            TableBorderPart.CellLeft => "│",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => "│",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "├",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "┤",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "└",
 | 
			
		||||
            TableBorderPart.FooterBottom => "─",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "┴",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "┘",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,44 +1,43 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a heavy border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class HeavyTableBorder : TableBorder
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a heavy border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class HeavyTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "┏",
 | 
			
		||||
                TableBorderPart.HeaderTop => "━",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "┳",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "┓",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "┃",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "┃",
 | 
			
		||||
                TableBorderPart.HeaderRight => "┃",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "┣",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "╋",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "┫",
 | 
			
		||||
                TableBorderPart.CellLeft => "┃",
 | 
			
		||||
                TableBorderPart.CellSeparator => "┃",
 | 
			
		||||
                TableBorderPart.CellRight => "┃",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "┣",
 | 
			
		||||
                TableBorderPart.FooterTop => "━",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "╋",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "┫",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "┗",
 | 
			
		||||
                TableBorderPart.FooterBottom => "━",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "┻",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "┛",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "┏",
 | 
			
		||||
            TableBorderPart.HeaderTop => "━",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "┳",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "┓",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "┃",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "┃",
 | 
			
		||||
            TableBorderPart.HeaderRight => "┃",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "┣",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "╋",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "┫",
 | 
			
		||||
            TableBorderPart.CellLeft => "┃",
 | 
			
		||||
            TableBorderPart.CellSeparator => "┃",
 | 
			
		||||
            TableBorderPart.CellRight => "┃",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "┣",
 | 
			
		||||
            TableBorderPart.FooterTop => "━",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "╋",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "┫",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "┗",
 | 
			
		||||
            TableBorderPart.FooterBottom => "━",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "┻",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "┛",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a horizontal border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class HorizontalTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a horizontal border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class HorizontalTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "─",
 | 
			
		||||
                TableBorderPart.HeaderTop => "─",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "─",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "─",
 | 
			
		||||
                TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "─",
 | 
			
		||||
                TableBorderPart.CellLeft => " ",
 | 
			
		||||
                TableBorderPart.CellSeparator => " ",
 | 
			
		||||
                TableBorderPart.CellRight => " ",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "─",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "─",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "─",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "─",
 | 
			
		||||
                TableBorderPart.FooterBottom => "─",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "─",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "─",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "─",
 | 
			
		||||
            TableBorderPart.HeaderTop => "─",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "─",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "─",
 | 
			
		||||
            TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "─",
 | 
			
		||||
            TableBorderPart.CellLeft => " ",
 | 
			
		||||
            TableBorderPart.CellSeparator => " ",
 | 
			
		||||
            TableBorderPart.CellRight => " ",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "─",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "─",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "─",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "─",
 | 
			
		||||
            TableBorderPart.FooterBottom => "─",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "─",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "─",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -2,112 +2,111 @@ using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Text;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a Markdown border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class MarkdownTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a Markdown border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class MarkdownTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderTop => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
                TableBorderPart.HeaderRight => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "-",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "|",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
                TableBorderPart.CellLeft => "|",
 | 
			
		||||
                TableBorderPart.CellSeparator => "|",
 | 
			
		||||
                TableBorderPart.CellRight => "|",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterTop => " ",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => " ",
 | 
			
		||||
                TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterBottom => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetColumnRow(TablePart part, IReadOnlyList<int> widths, IReadOnlyList<IColumn> columns)
 | 
			
		||||
        {
 | 
			
		||||
            if (part == TablePart.FooterSeparator)
 | 
			
		||||
            {
 | 
			
		||||
                return string.Empty;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (part != TablePart.HeaderSeparator)
 | 
			
		||||
            {
 | 
			
		||||
                return base.GetColumnRow(part, widths, columns);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            var (left, center, separator, right) = GetTableParts(part);
 | 
			
		||||
 | 
			
		||||
            var builder = new StringBuilder();
 | 
			
		||||
            builder.Append(left);
 | 
			
		||||
 | 
			
		||||
            foreach (var (columnIndex, _, lastColumn, columnWidth) in widths.Enumerate())
 | 
			
		||||
            {
 | 
			
		||||
                var padding = columns[columnIndex].Padding;
 | 
			
		||||
 | 
			
		||||
                if (padding != null && padding.Value.Left > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    // Left padding
 | 
			
		||||
                    builder.Append(" ".Repeat(padding.Value.Left));
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                var justification = columns[columnIndex].Alignment;
 | 
			
		||||
                if (justification == null)
 | 
			
		||||
                {
 | 
			
		||||
                    // No alignment
 | 
			
		||||
                    builder.Append(center.Repeat(columnWidth));
 | 
			
		||||
                }
 | 
			
		||||
                else if (justification.Value == Justify.Left)
 | 
			
		||||
                {
 | 
			
		||||
                    // Left
 | 
			
		||||
                    builder.Append(':');
 | 
			
		||||
                    builder.Append(center.Repeat(columnWidth - 1));
 | 
			
		||||
                }
 | 
			
		||||
                else if (justification.Value == Justify.Center)
 | 
			
		||||
                {
 | 
			
		||||
                    // Centered
 | 
			
		||||
                    builder.Append(':');
 | 
			
		||||
                    builder.Append(center.Repeat(columnWidth - 2));
 | 
			
		||||
                    builder.Append(':');
 | 
			
		||||
                }
 | 
			
		||||
                else if (justification.Value == Justify.Right)
 | 
			
		||||
                {
 | 
			
		||||
                    // Right
 | 
			
		||||
                    builder.Append(center.Repeat(columnWidth - 1));
 | 
			
		||||
                    builder.Append(':');
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Right padding
 | 
			
		||||
                if (padding != null && padding.Value.Right > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    builder.Append(" ".Repeat(padding.Value.Right));
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (!lastColumn)
 | 
			
		||||
                {
 | 
			
		||||
                    builder.Append(separator);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            builder.Append(right);
 | 
			
		||||
            return builder.ToString();
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderTop => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "|",
 | 
			
		||||
            TableBorderPart.HeaderRight => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "-",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "|",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "|",
 | 
			
		||||
            TableBorderPart.CellLeft => "|",
 | 
			
		||||
            TableBorderPart.CellSeparator => "|",
 | 
			
		||||
            TableBorderPart.CellRight => "|",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterTop => " ",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => " ",
 | 
			
		||||
            TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterBottom => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetColumnRow(TablePart part, IReadOnlyList<int> widths, IReadOnlyList<IColumn> columns)
 | 
			
		||||
    {
 | 
			
		||||
        if (part == TablePart.FooterSeparator)
 | 
			
		||||
        {
 | 
			
		||||
            return string.Empty;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (part != TablePart.HeaderSeparator)
 | 
			
		||||
        {
 | 
			
		||||
            return base.GetColumnRow(part, widths, columns);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        var (left, center, separator, right) = GetTableParts(part);
 | 
			
		||||
 | 
			
		||||
        var builder = new StringBuilder();
 | 
			
		||||
        builder.Append(left);
 | 
			
		||||
 | 
			
		||||
        foreach (var (columnIndex, _, lastColumn, columnWidth) in widths.Enumerate())
 | 
			
		||||
        {
 | 
			
		||||
            var padding = columns[columnIndex].Padding;
 | 
			
		||||
 | 
			
		||||
            if (padding != null && padding.Value.Left > 0)
 | 
			
		||||
            {
 | 
			
		||||
                // Left padding
 | 
			
		||||
                builder.Append(" ".Repeat(padding.Value.Left));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            var justification = columns[columnIndex].Alignment;
 | 
			
		||||
            if (justification == null)
 | 
			
		||||
            {
 | 
			
		||||
                // No alignment
 | 
			
		||||
                builder.Append(center.Repeat(columnWidth));
 | 
			
		||||
            }
 | 
			
		||||
            else if (justification.Value == Justify.Left)
 | 
			
		||||
            {
 | 
			
		||||
                // Left
 | 
			
		||||
                builder.Append(':');
 | 
			
		||||
                builder.Append(center.Repeat(columnWidth - 1));
 | 
			
		||||
            }
 | 
			
		||||
            else if (justification.Value == Justify.Center)
 | 
			
		||||
            {
 | 
			
		||||
                // Centered
 | 
			
		||||
                builder.Append(':');
 | 
			
		||||
                builder.Append(center.Repeat(columnWidth - 2));
 | 
			
		||||
                builder.Append(':');
 | 
			
		||||
            }
 | 
			
		||||
            else if (justification.Value == Justify.Right)
 | 
			
		||||
            {
 | 
			
		||||
                // Right
 | 
			
		||||
                builder.Append(center.Repeat(columnWidth - 1));
 | 
			
		||||
                builder.Append(':');
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Right padding
 | 
			
		||||
            if (padding != null && padding.Value.Right > 0)
 | 
			
		||||
            {
 | 
			
		||||
                builder.Append(" ".Repeat(padding.Value.Right));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (!lastColumn)
 | 
			
		||||
            {
 | 
			
		||||
                builder.Append(separator);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        builder.Append(right);
 | 
			
		||||
        return builder.ToString();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a minimal border with a double header border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class MinimalDoubleHeadTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a minimal border with a double header border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class MinimalDoubleHeadTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderTop => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
                TableBorderPart.HeaderRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "═",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "╪",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => " ",
 | 
			
		||||
                TableBorderPart.CellLeft => " ",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => " ",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterTop => "═",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "╪",
 | 
			
		||||
                TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterBottom => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderTop => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
            TableBorderPart.HeaderRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "═",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "╪",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => " ",
 | 
			
		||||
            TableBorderPart.CellLeft => " ",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => " ",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterTop => "═",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "╪",
 | 
			
		||||
            TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterBottom => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,44 +1,43 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a minimal border with a heavy header.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class MinimalHeavyHeadTableBorder : TableBorder
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override TableBorder? SafeBorder => TableBorder.Minimal;
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a minimal border with a heavy header.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class MinimalHeavyHeadTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override TableBorder? SafeBorder => TableBorder.Minimal;
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderTop => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
                TableBorderPart.HeaderRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "┿",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => " ",
 | 
			
		||||
                TableBorderPart.CellLeft => " ",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => " ",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterTop => "━",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "┿",
 | 
			
		||||
                TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterBottom => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderTop => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
            TableBorderPart.HeaderRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "┿",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => " ",
 | 
			
		||||
            TableBorderPart.CellLeft => " ",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => " ",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterTop => "━",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "┿",
 | 
			
		||||
            TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterBottom => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a minimal border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class MinimalTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a minimal border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class MinimalTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderTop => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
                TableBorderPart.HeaderRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => " ",
 | 
			
		||||
                TableBorderPart.CellLeft => " ",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => " ",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
                TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterBottom => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderTop => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
            TableBorderPart.HeaderRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => " ",
 | 
			
		||||
            TableBorderPart.CellLeft => " ",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => " ",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
            TableBorderPart.FooterTopRight => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterBottom => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,17 +1,16 @@
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents an invisible border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class NoTableBorder : TableBorder
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override bool Visible => false;
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        {
 | 
			
		||||
            return " ";
 | 
			
		||||
        }
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents an invisible border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class NoTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override bool Visible => false;
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        return " ";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,44 +1,43 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a rounded border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class RoundedTableBorder : TableBorder
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a rounded border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class RoundedTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override TableBorder? SafeBorder => TableBorder.Square;
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "╭",
 | 
			
		||||
                TableBorderPart.HeaderTop => "─",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "┬",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "╮",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "│",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
                TableBorderPart.HeaderRight => "│",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "├",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "┤",
 | 
			
		||||
                TableBorderPart.CellLeft => "│",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => "│",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "├",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "┤",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "╰",
 | 
			
		||||
                TableBorderPart.FooterBottom => "─",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "┴",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "╯",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "╭",
 | 
			
		||||
            TableBorderPart.HeaderTop => "─",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "┬",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "╮",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "│",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
            TableBorderPart.HeaderRight => "│",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "├",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "┤",
 | 
			
		||||
            TableBorderPart.CellLeft => "│",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => "│",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "├",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "┤",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "╰",
 | 
			
		||||
            TableBorderPart.FooterBottom => "─",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "┴",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "╯",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,44 +1,43 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a simple border with heavy lines.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class SimpleHeavyTableBorder : TableBorder
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override TableBorder? SafeBorder => TableBorder.Simple;
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a simple border with heavy lines.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class SimpleHeavyTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override TableBorder? SafeBorder => TableBorder.Simple;
 | 
			
		||||
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderTop => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "━",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "━",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "━",
 | 
			
		||||
                TableBorderPart.CellLeft => " ",
 | 
			
		||||
                TableBorderPart.CellSeparator => " ",
 | 
			
		||||
                TableBorderPart.CellRight => " ",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "━",
 | 
			
		||||
                TableBorderPart.FooterTop => "━",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "━",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "━",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterBottom => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderTop => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "━",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "━",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "━",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "━",
 | 
			
		||||
            TableBorderPart.CellLeft => " ",
 | 
			
		||||
            TableBorderPart.CellSeparator => " ",
 | 
			
		||||
            TableBorderPart.CellRight => " ",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "━",
 | 
			
		||||
            TableBorderPart.FooterTop => "━",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "━",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "━",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterBottom => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a simple border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class SimpleTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a simple border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class SimpleTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderTop => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => " ",
 | 
			
		||||
                TableBorderPart.HeaderRight => " ",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "─",
 | 
			
		||||
                TableBorderPart.CellLeft => " ",
 | 
			
		||||
                TableBorderPart.CellSeparator => " ",
 | 
			
		||||
                TableBorderPart.CellRight => " ",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "─",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "─",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "─",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
                TableBorderPart.FooterBottom => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderTop => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderLeft => " ",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => " ",
 | 
			
		||||
            TableBorderPart.HeaderRight => " ",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "─",
 | 
			
		||||
            TableBorderPart.CellLeft => " ",
 | 
			
		||||
            TableBorderPart.CellSeparator => " ",
 | 
			
		||||
            TableBorderPart.CellRight => " ",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "─",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "─",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "─",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => " ",
 | 
			
		||||
            TableBorderPart.FooterBottom => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => " ",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => " ",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +1,40 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace Spectre.Console.Rendering
 | 
			
		||||
namespace Spectre.Console.Rendering;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Represents a square border.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class SquareTableBorder : TableBorder
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Represents a square border.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public sealed class SquareTableBorder : TableBorder
 | 
			
		||||
    /// <inheritdoc/>
 | 
			
		||||
    public override string GetPart(TableBorderPart part)
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc/>
 | 
			
		||||
        public override string GetPart(TableBorderPart part)
 | 
			
		||||
        return part switch
 | 
			
		||||
        {
 | 
			
		||||
            return part switch
 | 
			
		||||
            {
 | 
			
		||||
                TableBorderPart.HeaderTopLeft => "┌",
 | 
			
		||||
                TableBorderPart.HeaderTop => "─",
 | 
			
		||||
                TableBorderPart.HeaderTopSeparator => "┬",
 | 
			
		||||
                TableBorderPart.HeaderTopRight => "┐",
 | 
			
		||||
                TableBorderPart.HeaderLeft => "│",
 | 
			
		||||
                TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
                TableBorderPart.HeaderRight => "│",
 | 
			
		||||
                TableBorderPart.HeaderBottomLeft => "├",
 | 
			
		||||
                TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
                TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
                TableBorderPart.HeaderBottomRight => "┤",
 | 
			
		||||
                TableBorderPart.CellLeft => "│",
 | 
			
		||||
                TableBorderPart.CellSeparator => "│",
 | 
			
		||||
                TableBorderPart.CellRight => "│",
 | 
			
		||||
                TableBorderPart.FooterTopLeft => "├",
 | 
			
		||||
                TableBorderPart.FooterTop => "─",
 | 
			
		||||
                TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
                TableBorderPart.FooterTopRight => "┤",
 | 
			
		||||
                TableBorderPart.FooterBottomLeft => "└",
 | 
			
		||||
                TableBorderPart.FooterBottom => "─",
 | 
			
		||||
                TableBorderPart.FooterBottomSeparator => "┴",
 | 
			
		||||
                TableBorderPart.FooterBottomRight => "┘",
 | 
			
		||||
                _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
            TableBorderPart.HeaderTopLeft => "┌",
 | 
			
		||||
            TableBorderPart.HeaderTop => "─",
 | 
			
		||||
            TableBorderPart.HeaderTopSeparator => "┬",
 | 
			
		||||
            TableBorderPart.HeaderTopRight => "┐",
 | 
			
		||||
            TableBorderPart.HeaderLeft => "│",
 | 
			
		||||
            TableBorderPart.HeaderSeparator => "│",
 | 
			
		||||
            TableBorderPart.HeaderRight => "│",
 | 
			
		||||
            TableBorderPart.HeaderBottomLeft => "├",
 | 
			
		||||
            TableBorderPart.HeaderBottom => "─",
 | 
			
		||||
            TableBorderPart.HeaderBottomSeparator => "┼",
 | 
			
		||||
            TableBorderPart.HeaderBottomRight => "┤",
 | 
			
		||||
            TableBorderPart.CellLeft => "│",
 | 
			
		||||
            TableBorderPart.CellSeparator => "│",
 | 
			
		||||
            TableBorderPart.CellRight => "│",
 | 
			
		||||
            TableBorderPart.FooterTopLeft => "├",
 | 
			
		||||
            TableBorderPart.FooterTop => "─",
 | 
			
		||||
            TableBorderPart.FooterTopSeparator => "┼",
 | 
			
		||||
            TableBorderPart.FooterTopRight => "┤",
 | 
			
		||||
            TableBorderPart.FooterBottomLeft => "└",
 | 
			
		||||
            TableBorderPart.FooterBottom => "─",
 | 
			
		||||
            TableBorderPart.FooterBottomSeparator => "┴",
 | 
			
		||||
            TableBorderPart.FooterBottomRight => "┘",
 | 
			
		||||
            _ => throw new InvalidOperationException("Unknown border part."),
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user