Case in point:
internal static string ToDropdownBootstrapClass(this BsDirection direction)
{
return direction switch
{
BsDirection.Start => "",
BsDirection.End => "dropdown-menu-end",
BsDirection.Down or BsDirection.Up => throw new ArgumentOutOfRangeException(
nameof(direction),
direction,
$"Only {nameof(BsDirection.Start)} or {nameof(BsDirection.End)} are valid for dropdown menu alignment"
),
_ => throw new ArgumentOutOfRangeException(nameof(direction), direction, null),
};
}