DotNext by Roman Sakno

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

 Future<T>

public abstract class Future<T> : Future, IConvertible<T> where T : Task
Represents Future pattern that can be converted into Task.
using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace DotNext.Threading.Tasks { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public abstract class Future<[System.Runtime.CompilerServices.Nullable(0)] T> : Future, IConvertible<T> where T : Task { protected Future(bool runContinuationsAsynchronously = true) : base(runContinuationsAsynchronously) { } public abstract T AsTask(); T IConvertible<T>.Convert() { return AsTask(); } } }