lastunicorn / ConsoleTools

A set of tools and "controls" for the .net Console.
GNU General Public License v3.0
73 stars 5 forks source link

HorizontalLine - Add margin parameter in the `QuickDisplay` method #72

Closed lastunicorn closed 1 month ago

lastunicorn commented 2 years ago

As a developer using the HorizontalLine control I want to be able to provide a margin parameter when using the QuickDisplay approach so that I am able to write more compact code.

lastunicorn commented 1 month ago

Instead of adding new parameters to the static method, I created one that lets the caller set any property on the HorizontalLine before displaying it.

Usage:

HorizontalLine.QuickDisplay(horizontalLine =>
{
    horizontalLine.Margin = 10;
    horizontalLine.ForegroundColor = ConsoleColor.Blue;
});