mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
19 lines
370 B
C#
19 lines
370 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CliFx.Tests.Internal
|
|
{
|
|
internal static class TaskExtensions
|
|
{
|
|
public static async Task IgnoreCancellation(this Task task)
|
|
{
|
|
try
|
|
{
|
|
await task;
|
|
}
|
|
catch (OperationCanceledException)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
} |