<PackageReference Include="Microsoft.Bcl" Version="1.1.7" />

System.Threading.Tasks.Task<TResult>

public class Task<TResult> : Task
Represents an asynchronous operation that produces a result at some time in the future.
public static TaskFactory<TResult> Factory { get; }

Provides access to factory methods for creating Task<T> instances.

public TResult Result { get; }

Gets the result value of this Task<T>.

public Task(Func<TResult> function)

Initializes a new Task<T> with the specified function.

public Task(Func<TResult> function, CancellationToken cancellationToken)

Initializes a new Task<T> with the specified function.

public Task(Func<TResult> function, TaskCreationOptions creationOptions)

Initializes a new Task<T> with the specified function and creation options.

public Task(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions)

Initializes a new Task<T> with the specified function and creation options.

public Task(Func<object, TResult> function, object state)

Initializes a new Task<T> with the specified function and state.

public Task(Func<object, TResult> function, object state, CancellationToken cancellationToken)

Initializes a new Task<T> with the specified action, state, and options.

public Task(Func<object, TResult> function, object state, TaskCreationOptions creationOptions)

Initializes a new Task<T> with the specified action, state, and options.

public Task(Func<object, TResult> function, object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions)

Initializes a new Task<T> with the specified action, state, and options.

public Task ContinueWith(Action<Task<TResult>> continuationAction)

Creates a continuation that executes when the target Task<T> completes.

public Task ContinueWith(Action<Task<TResult>> continuationAction, CancellationToken cancellationToken)

Creates a continuation that executes when the target Task<T> completes.

public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler)

Creates a continuation that executes when the target Task<T> completes.

public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskContinuationOptions continuationOptions)

Creates a continuation that executes when the target Task<T> completes.

public Task ContinueWith(Action<Task<TResult>> continuationAction, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)

Creates a continuation that executes when the target Task<T> completes.

public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction)

Creates a continuation that executes when the target Task<T> completes.

public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken)

Creates a continuation that executes when the target Task<T> completes.

public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler)

Creates a continuation that executes when the target Task<T> completes.

public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskContinuationOptions continuationOptions)

Creates a continuation that executes when the target Task<T> completes.

public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)

Creates a continuation that executes when the target Task<T> completes.