Future<T>
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();
}
}
}