Task Methods

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

The Task type exposes the following members.

Methods

  Name Description
Public method ContinueWith(Action<Task>) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith(Action<Task>, CancellationToken) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith(Action<Task>, TaskContinuationOptions) Creates a continuation that executes according to the specified TaskContinuationOptions.
Public method ContinueWith(Action<Task>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith(Action<Task>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according to the specified TaskContinuationOptions.
Public method ContinueWith<TResult>(Func<Task, TResult>) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith<TResult>(Func<Task, TResult>, CancellationToken) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith<TResult>(Func<Task, TResult>, TaskContinuationOptions) Creates a continuation that executes according to the condition specified in continuationOptions.
Public method ContinueWith<TResult>(Func<Task, TResult>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith<TResult>(Func<Task, TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according to the condition specified in continuationOptions.
Public method Dispose() Releases all resources used by the current instance of the Task class.
Protected method Dispose(Boolean) Disposes the Task, releasing all of its unmanaged resources.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method RunSynchronously() Runs the Task synchronously on the current TaskScheduler.
Public method RunSynchronously(TaskScheduler) Runs the Task synchronously on the TaskScheduler provided.
Public method Start() Starts the Task, scheduling it for execution to the current TaskScheduler.
Public method Start(TaskScheduler) Starts the Task, scheduling it for execution to the specified TaskScheduler.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Wait() Waits for the Task to complete execution.
Public method Wait(CancellationToken) Waits for the Task to complete execution.
Public method Wait(Int32) Waits for the Task to complete execution.
Public method Wait(TimeSpan) Waits for the Task to complete execution.
Public method Wait(Int32, CancellationToken) Waits for the Task to complete execution.
Public methodStatic member WaitAll(array<Task[]) Waits for all of the provided Task objects to complete execution.
Public methodStatic member WaitAll(array<Task[], Int32) Waits for all of the provided Task objects to complete execution.
Public methodStatic member WaitAll(array<Task[], CancellationToken) Waits for all of the provided Task objects to complete execution.
Public methodStatic member WaitAll(array<Task[], TimeSpan) Waits for all of the provided Task objects to complete execution.
Public methodStatic member WaitAll(array<Task[], Int32, CancellationToken) Waits for all of the provided Task objects to complete execution.
Public methodStatic member WaitAny(array<Task[]) Waits for any of the provided Task objects to complete execution.
Public methodStatic member WaitAny(array<Task[], Int32) Waits for any of the provided Task objects to complete execution.
Public methodStatic member WaitAny(array<Task[], CancellationToken) Waits for any of the provided Task objects to complete execution.
Public methodStatic member WaitAny(array<Task[], TimeSpan) Waits for any of the provided Task objects to complete execution.
Public methodStatic member WaitAny(array<Task[], Int32, CancellationToken) Waits for any of the provided Task objects to complete execution.

Top