DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="2.1.0" />

 Continuation<T, C>

static class Continuation<T, C> where C : Constant<T>
using DotNext.Generic; using System; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace DotNext.Threading.Tasks { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] internal static class Continuation<[System.Runtime.CompilerServices.Nullable(2)] T, [System.Runtime.CompilerServices.Nullable(0)] C> where C : Constant<T>, new { internal static readonly Func<Task<T>, T> WhenFaulted = CompletedTask<T, C>.WhenFaulted; internal static readonly Func<Task<T>, T> WhenCanceled = CompletedTask<T, C>.WhenCanceled; internal static readonly Func<Task<T>, T> WhenFaultedOrCanceled = CompletedTask<T, C>.WhenFaultedOrCanceled; } }