Export (0) Print
Expand All

Task Methods

The Task type exposes the following members.

  Name Description
Public method ConfigureAwait Configures an awaiter used to await this Task.
Public method Supported by Portable Class Library ContinueWith(Action<Task>) Creates a continuation that executes asynchronously when the target Task completes.
Public method Supported by Portable Class Library ContinueWith(Action<Task>, CancellationToken) Creates a continuation that executes asynchronously when the target Task completes.
Public method Supported by Portable Class Library ContinueWith(Action<Task>, TaskContinuationOptions) Creates a continuation that executes according to the specified TaskContinuationOptions.
Public method Supported by Portable Class Library ContinueWith(Action<Task>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith(Action<Task, Object>, Object) Creates a continuation that executes when the target Task completes.
Public method ContinueWith(Action<Task, Object>, Object, CancellationToken) Creates a continuation that executes when the target Task completes.
Public method ContinueWith(Action<Task, Object>, Object, TaskContinuationOptions) Creates a continuation that executes when the target Task completes.
Public method ContinueWith(Action<Task, Object>, Object, TaskScheduler) Creates a continuation that executes when the target Task completes.
Public method Supported by Portable Class Library ContinueWith(Action<Task>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according to the specified TaskContinuationOptions.
Public method ContinueWith(Action<Task, Object>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes when the target Task completes.
Public method Supported by Portable Class Library ContinueWith<TResult>(Func<Task, TResult>) Creates a continuation that executes asynchronously when the target Task completes.
Public method Supported by Portable Class Library ContinueWith<TResult>(Func<Task, TResult>, CancellationToken) Creates a continuation that executes asynchronously when the target Task completes.
Public method Supported by Portable Class Library ContinueWith<TResult>(Func<Task, TResult>, TaskContinuationOptions) Creates a continuation that executes according to the condition specified in continuationOptions.
Public method Supported by Portable Class Library ContinueWith<TResult>(Func<Task, TResult>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task completes.
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object) Creates a continuation that executes when the target Task completes.
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object, CancellationToken) Creates a continuation that executes when the target Task completes.
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object, TaskContinuationOptions) Creates a continuation that executes when the target Task completes.
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object, TaskScheduler) Creates a continuation that executes when the target Task completes.
Public method Supported by Portable Class Library ContinueWith<TResult>(Func<Task, TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according to the condition specified in continuationOptions.
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes when the target Task completes.
Public method Static member Delay(Int32) Creates a task that completes after a time delay.
Public method Static member Delay(TimeSpan) Creates a task that completes after a specified time interval.
Public method Static member Delay(Int32, CancellationToken) Creates a cancellable task that completes after a time delay.
Public method Static member Delay(TimeSpan, CancellationToken) Creates a cancellable task that completes after a specified time interval.
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 Supported by Portable Class Library Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Supported by Portable Class Library Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Static member FromCanceled(CancellationToken) Creates a Task that's completed due to cancellation with a specified cancellation token.
Public method Static member FromCanceled<TResult>(CancellationToken) Creates a Task<TResult> that's completed due to cancellation with a specified cancellation token.
Public method Static member FromException(Exception) Creates a Task that has completed with a specified exception.
Public method Static member FromException<TResult>(Exception) Creates a Task<TResult> that's completed with a specified exception.
Public method Static member FromResult<TResult> Creates a Task<TResult> that's completed successfully with the specified result.
Public method GetAwaiter Gets an awaiter used to await this Task.
Public method Supported by Portable Class Library GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method Supported by Portable Class Library GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Supported by Portable Class Library MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Static member Run(Action) Queues the specified work to run on the ThreadPool and returns a task handle for that work.
Public method Static member Run(Func<Task>) Queues the specified work to run on the ThreadPool and returns a proxy for the task returned by function.
Public method Static member Run(Action, CancellationToken) Queues the specified work to run on the ThreadPool and returns a task handle for that work.
Public method Static member Run(Func<Task>, CancellationToken) Queues the specified work to run on the ThreadPool and returns a proxy for the task returned by function.
Public method Static member Run<TResult>(Func<Task<TResult>>) Queues the specified work to run on the ThreadPool and returns a proxy for the Task(TResult) returned by function.
Public method Static member Run<TResult>(Func<TResult>) Queues the specified work to run on the thread pool and returns a Task<TResult> object that represents that work.
Public method Static member Run<TResult>(Func<Task<TResult>>, CancellationToken) Queues the specified work to run on the ThreadPool and returns a proxy for the Task(TResult) returned by function.
Public method Static member Run<TResult>(Func<TResult>, CancellationToken) Queues the specified work to run on the thread pool and returns a Task(TResult) handle for that work.
Public method Supported by Portable Class Library RunSynchronously() Runs the Task synchronously on the current TaskScheduler.
Public method Supported by Portable Class Library RunSynchronously(TaskScheduler) Runs the Task synchronously on the TaskScheduler provided.
Public method Supported by Portable Class Library Start() Starts the Task, scheduling it for execution to the current TaskScheduler.
Public method Supported by Portable Class Library Start(TaskScheduler) Starts the Task, scheduling it for execution to the specified TaskScheduler.
Public method Supported by Portable Class Library ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Supported by Portable Class Library Wait() Waits for the Task to complete execution.
Public method Supported by Portable Class Library Wait(CancellationToken) Waits for the Task to complete execution. The wait terminates if a cancellation token is canceled before the task completes.
Public method Supported by Portable Class Library Wait(Int32) Waits for the Task to complete execution within a specified number of milliseconds.
Public method Supported by Portable Class Library Wait(TimeSpan) Waits for the Task to complete execution within a specified time interval.
Public method Supported by Portable Class Library Wait(Int32, CancellationToken) Waits for the Task to complete execution. The wait terminates if a timeout interval elapses or a cancellation token is canceled before the task completes.
Public method Static member Supported by Portable Class Library WaitAll(Task[]) Waits for all of the provided Task objects to complete execution.
Public method Static member Supported by Portable Class Library WaitAll(Task[], Int32) Waits for all of the provided Task objects to complete execution within a specified number of milliseconds.
Public method Static member Supported by Portable Class Library WaitAll(Task[], CancellationToken) Waits for all of the provided Task objects to complete execution unless the wait is cancelled.
Public method Static member Supported by Portable Class Library WaitAll(Task[], TimeSpan) Waits for all of the provided cancellable Task objects to complete execution within a specified time interval.
Public method Static member Supported by Portable Class Library WaitAll(Task[], Int32, CancellationToken) Waits for all of the provided Task objects to complete execution within a specified number of milliseconds or until the wait is cancelled.
Public method Static member Supported by Portable Class Library WaitAny(Task[]) Waits for any of the provided Task objects to complete execution.
Public method Static member Supported by Portable Class Library WaitAny(Task[], Int32) Waits for any of the provided Task objects to complete execution within a specified number of milliseconds.
Public method Static member Supported by Portable Class Library WaitAny(Task[], CancellationToken) Waits for any of the provided Task objects to complete execution unless the wait is cancelled.
Public method Static member Supported by Portable Class Library WaitAny(Task[], TimeSpan) Waits for any of the provided Task objects to complete execution within a specified time interval.
Public method Static member Supported by Portable Class Library WaitAny(Task[], Int32, CancellationToken) Waits for any of the provided Task objects to complete execution within a specified number of milliseconds or until a cancellation token is cancelled.
Public method Static member WhenAll(IEnumerable<Task>) Creates a task that will complete when all of the Task objects in an enumerable collection have completed.
Public method Static member WhenAll(Task[]) Creates a task that will complete when all of the Task objects in an array have completed.
Public method Static member WhenAll<TResult>(IEnumerable<Task<TResult>>) Creates a task that will complete when all of the Task<TResult> objects in an enumerable collection have completed.
Public method Static member WhenAll<TResult>(Task<TResult>[]) Creates a task that will complete when all of the Task<TResult> objects in an array have completed.
Public method Static member WhenAny(IEnumerable<Task>) Creates a task that will complete when any of the supplied tasks have completed.
Public method Static member WhenAny(Task[]) Creates a task that will complete when any of the supplied tasks have completed.
Public method Static member WhenAny<TResult>(IEnumerable<Task<TResult>>) Creates a task that will complete when any of the supplied tasks have completed.
Public method Static member WhenAny<TResult>(Task<TResult>[]) Creates a task that will complete when any of the supplied tasks have completed.
Public method Static member Yield Creates an awaitable task that asynchronously yields back to the current context when awaited.
Top

  Name Description
Public Extension Method AsAsyncAction Returns a Windows Runtime asynchronous action that represents a started task. (Defined by WindowsRuntimeSystemExtensions.)
Public Extension Method DispatcherOperationWait() Overloaded. Waits indefinitely for the underlying DispatcherOperation to complete. (Defined by TaskExtensions.)
Public Extension Method DispatcherOperationWait(TimeSpan) Overloaded. Waits for the specified amount of time for the underlying DispatcherOperation to complete. (Defined by TaskExtensions.)
Public Extension Method IsDispatcherOperationTask Returns a value that indicates whether this Task is associated with a DispatcherOperation. (Defined by TaskExtensions.)
Top
Show:
© 2015 Microsoft