namespace Spectre.Console.Rendering; /// /// Contains extension methods for . /// public static class BoxExtensions { /// /// Gets the safe border for a border. /// /// The border to get the safe border for. /// Whether or not to return the safe border. /// The safe border if one exist, otherwise the original border. public static BoxBorder GetSafeBorder(this BoxBorder border, bool safe) { if (border is null) { throw new ArgumentNullException(nameof(border)); } if (safe && border.SafeBorder != null) { border = border.SafeBorder; } return border; } }