mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-12-24 02:25:48 +08:00
Add async spinner extension methods and related documentation
This commit is contained in:
13
src/Spectre.Console/Internal/Polyfill/CancellationToken.cs
Normal file
13
src/Spectre.Console/Internal/Polyfill/CancellationToken.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
#if NETSTANDARD2_0
|
||||
namespace Spectre.Console
|
||||
{
|
||||
internal static class CancellationTokenHelpers
|
||||
{
|
||||
public static Task CancelAsync(this CancellationTokenSource cts)
|
||||
{
|
||||
cts.Cancel();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user