Files
Aaru/Aaru.Core/Spectre.cs
Natalia Portillo 7363a5d9c5 Redo Reformat and cleanup.
Rider EAP was having a bug interpreting .editorconfig that didn't generate the code style as we wanted.
This is now done with Rider-stable.
2023-10-04 17:36:20 +01:00

16 lines
901 B
C#

using System;
using Spectre.Console;
namespace Aaru.Core;
/// <summary>Implement core operations using the Spectre console</summary>
public static class Spectre
{
/// <summary>Initializes a progress bar with a single spinner</summary>
/// <param name="action">Action to execute in the progress bar</param>
public static void ProgressSingleSpinner(Action<ProgressContext> action) => AnsiConsole.Progress().
AutoClear(true).
HideCompleted(true).
Columns(new TaskDescriptionColumn(), new SpinnerColumn()).
Start(action);
}