Add a clear console function (#110)

This commit is contained in:
Alex Rosenfeld
2021-07-19 07:33:07 -04:00
committed by GitHub
parent 51cca36d2a
commit 6c96e9e173
3 changed files with 13 additions and 0 deletions

View File

@@ -85,6 +85,11 @@ namespace CliFx.Infrastructure
}
}
/// <inheritdoc />
public void Clear()
{
}
/// <inheritdoc />
public virtual void Dispose() => _cancellationTokenSource.Dispose();
}

View File

@@ -82,6 +82,11 @@ namespace CliFx.Infrastructure
/// </para>
/// </remarks>
CancellationToken RegisterCancellationHandler();
/// <summary>
/// Clears the console buffer and corresponding console window of display information.
/// </summary>
void Clear();
}
/// <summary>

View File

@@ -90,6 +90,9 @@ namespace CliFx.Infrastructure
return (_cancellationTokenSource = cts).Token;
}
/// <inheritdoc />
public void Clear() => Console.Clear();
/// <inheritdoc />
public void Dispose()
{