System.Threading.Tasks.Task: Method Members

The methods of System.Threading.Tasks.Task are listed below. For a list of all members, see the Task Members list.

See Also: Inherited members from System.Object

Public Methods

ConfigureAwait(bool) : System.Runtime.CompilerServices.ConfiguredTaskAwaitable

Configures an awaiter used to await this System.Threading.Tasks.Task.

ContinueWith(Action<System.Threading.Tasks.Task>) : System.Threading.Tasks.Task

Creates a continuation that executes asynchronously when the target System.Threading.Tasks.Task completes.

ContinueWith(Action<System.Threading.Tasks.Task, object>, object) : System.Threading.Tasks.Task

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith(Action<System.Threading.Tasks.Task>, CancellationToken) : System.Threading.Tasks.Task

Creates a continuation that executes asynchronously when the target System.Threading.Tasks.Task completes.

ContinueWith(Action<System.Threading.Tasks.Task>, System.Threading.Tasks.TaskContinuationOptions) : System.Threading.Tasks.Task

Creates a continuation that executes according to the specified System.Threading.Tasks.TaskContinuationOptions.

ContinueWith(Action<System.Threading.Tasks.Task>, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task

Creates a continuation that executes asynchronously when the target System.Threading.Tasks.Task completes.

ContinueWith(Action<System.Threading.Tasks.Task, object>, object, CancellationToken) : System.Threading.Tasks.Task

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith(Action<System.Threading.Tasks.Task, object>, object, System.Threading.Tasks.TaskContinuationOptions) : System.Threading.Tasks.Task

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith(Action<System.Threading.Tasks.Task, object>, object, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith(Action<System.Threading.Tasks.Task>, CancellationToken, System.Threading.Tasks.TaskContinuationOptions, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task

Creates a continuation that executes according to the specified System.Threading.Tasks.TaskContinuationOptions.

ContinueWith(Action<System.Threading.Tasks.Task, object>, object, CancellationToken, System.Threading.Tasks.TaskContinuationOptions, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, TResult>) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes asynchronously when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, object, TResult>, object) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, TResult>, CancellationToken) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes asynchronously when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, TResult>, System.Threading.Tasks.TaskContinuationOptions) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes according to the condition specified in continuationOptions.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, TResult>, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes asynchronously when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, object, TResult>, object, CancellationToken) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, object, TResult>, object, System.Threading.Tasks.TaskContinuationOptions) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, object, TResult>, object, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, TResult>, CancellationToken, System.Threading.Tasks.TaskContinuationOptions, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes according to the condition specified in continuationOptions.

ContinueWith<TResult>(Func<System.Threading.Tasks.Task, object, TResult>, object, CancellationToken, System.Threading.Tasks.TaskContinuationOptions, System.Threading.Tasks.TaskScheduler) : System.Threading.Tasks.Task<TResult>

Creates a continuation that executes when the target System.Threading.Tasks.Task completes.

static
Delay(int) : System.Threading.Tasks.Task

Creates a task that will complete after a time delay.

static
Delay(TimeSpan) : System.Threading.Tasks.Task

Creates a task that will complete after a time delay.

static
Delay(int, CancellationToken) : System.Threading.Tasks.Task

Creates a task that will complete after a time delay.

static
Delay(TimeSpan, CancellationToken) : System.Threading.Tasks.Task

Creates a task that will complete after a time delay.

Dispose()

Releases all resources used by the current instance of the System.Threading.Tasks.Task class.

static
FromResult<TResult>(TResult) : System.Threading.Tasks.Task<TResult>
Documentation for this section has not yet been entered.
GetAwaiter() : System.Runtime.CompilerServices.TaskAwaiter

Gets an awaiter used to await this System.Threading.Tasks.Task.

static
Run(Action) : System.Threading.Tasks.Task

Queues the specified work to run on the ThreadPool and returns a task handle for that work.

static
Run(Func<System.Threading.Tasks.Task>) : System.Threading.Tasks.Task

Queues the specified work to run on the ThreadPool and returns a proxy for the task returned by function.

static
Run(Action, CancellationToken) : System.Threading.Tasks.Task

Queues the specified work to run on the ThreadPool and returns a task handle for that work.

static
Run(Func<System.Threading.Tasks.Task>, CancellationToken) : System.Threading.Tasks.Task

Queues the specified work to run on the ThreadPool and returns a proxy for the task returned by function.

static
Run<TResult>(Func<System.Threading.Tasks.Task<TResult>>) : System.Threading.Tasks.Task<TResult>

Queues the specified work to run on the ThreadPool and returns a proxy for the Task(TResult) returned by function.

static
Run<TResult>(Func<TResult>) : System.Threading.Tasks.Task<TResult>

Queues the specified work to run on the ThreadPool and returns a Task(TResult) handle for that work.

static
Run<TResult>(Func<System.Threading.Tasks.Task<TResult>>, CancellationToken) : System.Threading.Tasks.Task<TResult>

Queues the specified work to run on the ThreadPool and returns a proxy for the Task(TResult) returned by function.

static
Run<TResult>(Func<TResult>, CancellationToken) : System.Threading.Tasks.Task<TResult>

Queues the specified work to run on the thread pool and returns a Task(TResult) handle for that work.

RunSynchronously()

Runs the System.Threading.Tasks.Task synchronously on the current System.Threading.Tasks.TaskScheduler.

RunSynchronously(System.Threading.Tasks.TaskScheduler)

Runs the System.Threading.Tasks.Task synchronously on the System.Threading.Tasks.TaskScheduler provided.

Start()

Starts the System.Threading.Tasks.Task, scheduling it for execution to the current System.Threading.Tasks.TaskScheduler.

Start(System.Threading.Tasks.TaskScheduler)

Starts the System.Threading.Tasks.Task, scheduling it for execution to the specified System.Threading.Tasks.TaskScheduler.

Wait()

Waits for the System.Threading.Tasks.Task to complete execution.

Wait(int) : bool

Waits for the System.Threading.Tasks.Task to complete execution within a specified number of milliseconds.

Wait(CancellationToken)

Waits for the cancellable System.Threading.Tasks.Task to complete execution.

Wait(TimeSpan) : bool

Waits for the System.Threading.Tasks.Task to complete execution within a specified time interval.

Wait(int, CancellationToken) : bool

Waits for the cancellable System.Threading.Tasks.Task to complete execution.

static
WaitAll(params System.Threading.Tasks.Task[])

Waits for all of the provided System.Threading.Tasks.Task objects to complete execution.

static
WaitAll(System.Threading.Tasks.Task[], int) : bool

Waits for all of the provided System.Threading.Tasks.Task objects to complete execution within a specified number of milliseconds.

static
WaitAll(System.Threading.Tasks.Task[], CancellationToken)

Waits for all of the provided cancellable System.Threading.Tasks.Task objects to complete execution.

static
WaitAll(System.Threading.Tasks.Task[], TimeSpan) : bool

Waits for all of the provided cancellable System.Threading.Tasks.Task objects to complete execution within a specified time interval.

static
WaitAll(System.Threading.Tasks.Task[], int, CancellationToken) : bool

Waits for all of the provided cancellable System.Threading.Tasks.Task objects to complete execution within a specified number of milliseconds.

static
WaitAny(params System.Threading.Tasks.Task[]) : int

Waits for any of the provided System.Threading.Tasks.Task objects to complete execution.

static
WaitAny(System.Threading.Tasks.Task[], int) : int

Waits for any of the provided System.Threading.Tasks.Task objects to complete execution within a specified number of milliseconds.

static
WaitAny(System.Threading.Tasks.Task[], CancellationToken) : int

Waits for any of the provided cancellable System.Threading.Tasks.Task objects to complete execution.

static
WaitAny(System.Threading.Tasks.Task[], TimeSpan) : int

Waits for any of the provided System.Threading.Tasks.Task objects to complete execution within a specified time interval.

static
WaitAny(System.Threading.Tasks.Task[], int, CancellationToken) : int

Waits for any of the provided cancellable System.Threading.Tasks.Task objects to complete execution within a specified number of milliseconds.

static
WhenAll(IEnumerable<System.Threading.Tasks.Task>) : System.Threading.Tasks.Task

Creates a task that will complete when all of the supplied tasks have completed.

static
WhenAll(params System.Threading.Tasks.Task[]) : System.Threading.Tasks.Task

Creates a task that will complete when all of the supplied tasks have completed.

static
WhenAll<TResult>(IEnumerable<System.Threading.Tasks.Task<TResult>>) : System.Threading.Tasks.Task<TResult[]>

Creates a task that will complete when all of the supplied tasks have completed.

static
WhenAll<TResult>(params System.Threading.Tasks.Task<TResult>[]) : System.Threading.Tasks.Task<TResult[]>

Creates a task that will complete when all of the supplied tasks have completed.

static
WhenAny(IEnumerable<System.Threading.Tasks.Task>) : System.Threading.Tasks.Task<System.Threading.Tasks.Task>

Creates a task that will complete when any of the supplied tasks have completed.

static
WhenAny(params System.Threading.Tasks.Task[]) : System.Threading.Tasks.Task<System.Threading.Tasks.Task>

Creates a task that will complete when any of the supplied tasks have completed.

static
WhenAny<TResult>(IEnumerable<System.Threading.Tasks.Task<TResult>>) : System.Threading.Tasks.Task<System.Threading.Tasks.Task<TResult>>

Creates a task that will complete when any of the supplied tasks have completed.

static
WhenAny<TResult>(params System.Threading.Tasks.Task<TResult>[]) : System.Threading.Tasks.Task<System.Threading.Tasks.Task<TResult>>

Creates a task that will complete when any of the supplied tasks have completed.

static
Yield() : System.Runtime.CompilerServices.YieldAwaitable

Creates an awaitable task that asynchronously yields back to the current context when awaited.

Protected Methods

Dispose(bool)

Disposes the System.Threading.Tasks.Task, releasing all of its unmanaged resources.