Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 1.09 KB

README.md

File metadata and controls

65 lines (45 loc) · 1.09 KB

VSpinner

The VSpinner is a console spinners with simple and minimal api.

Quick Start Example

using VSpinner;
// show spinner for 5 seconds
await ConsoleSpinner.Default.Start(5);

Task Example

using VSpinner;

static async Task DoTask()
{
    for (int i = 0; i < 10; i++)
    {
        await Task.Delay(100);

    }
}

var task1 = DoIt();

// show spinner till task is not completed
await ConsoleSpinner.Default.Start(task1);

Value Task Example

using VSpinner;

static async ValueTask DoTask()
{
    for (int i = 0; i < 10; i++)
    {
        await Task.Delay(100);

    }
}

var task1 = DoIt();

// show spinner till valuetask is not completed
await ConsoleSpinner.Default.Start(task1);

Set Custom Color & Delay Example

using VSpinner;

 await new ConsoleSpinner(SpinnerTypes.Loading)
        .SetColor(ConsoleColor.Yellow)
        .SetDelaySeconds(1)
        .Start(5);