Task<TResult> Methods

The Task<TResult> type exposes the following members.

  Name Description
Public method ConfigureAwait Configures an awaiter used to await this Task<TResult>.
Public method ContinueWith(Action<Task>) Creates a continuation that executes asynchronously when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task<TResult>>) Creates a continuation that executes asynchronously when the target Task<TResult> completes.
Public method ContinueWith(Action<Task>, CancellationToken) Creates a continuation that executes asynchronously when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task>, TaskContinuationOptions) Creates a continuation that executes according to the specified TaskContinuationOptions. (Inherited from Task.)
Public method ContinueWith(Action<Task>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task, Object>, Object) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task<TResult>>, CancellationToken) Creates a continuation that executes asynchronously when the target Task<TResult> completes.
Public method ContinueWith(Action<Task<TResult>>, TaskContinuationOptions) Creates a continuation that executes according the condition specified in continuationOptions.
Public method ContinueWith(Action<Task<TResult>>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task<TResult> completes.
Public method ContinueWith(Action<Task<TResult>, Object>, Object) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith(Action<Task, Object>, Object, CancellationToken) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task, Object>, Object, TaskContinuationOptions) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task, Object>, Object, TaskScheduler) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task<TResult>, Object>, Object, CancellationToken) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith(Action<Task<TResult>, Object>, Object, TaskContinuationOptions) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith(Action<Task<TResult>, Object>, Object, TaskScheduler) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith(Action<Task>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according to the specified TaskContinuationOptions. (Inherited from Task.)
Public method ContinueWith(Action<Task<TResult>>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according the condition specified in continuationOptions.
Public method ContinueWith(Action<Task, Object>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith(Action<Task<TResult>, Object>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith<TResult>(Func<Task, TResult>) Creates a continuation that executes asynchronously when the target Task completes. (Inherited from Task.)
Public method ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>) Creates a continuation that executes asynchronously when the target Task<TResult> completes.
Public method ContinueWith<TResult>(Func<Task, TResult>, CancellationToken) Creates a continuation that executes asynchronously when the target Task completes. (Inherited from Task.)
Public method ContinueWith<TResult>(Func<Task, TResult>, TaskContinuationOptions) Creates a continuation that executes according to the condition specified in continuationOptions. (Inherited from Task.)
Public method ContinueWith<TResult>(Func<Task, TResult>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task completes. (Inherited from Task.)
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, CancellationToken) Creates a continuation that executes asynchronously when the target Task<TResult> completes.
Public method ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, TaskContinuationOptions) Creates a continuation that executes according the condition specified in continuationOptions.
Public method ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, TaskScheduler) Creates a continuation that executes asynchronously when the target Task<TResult> completes.
Public method ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object, CancellationToken) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object, TaskContinuationOptions) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith<TResult>(Func<Task, Object, TResult>, Object, TaskScheduler) Creates a continuation that executes when the target Task completes. (Inherited from Task.)
Public method ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, CancellationToken) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, TaskContinuationOptions) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, TaskScheduler) Creates a continuation that executes when the target Task<TResult> completes.
Public method ContinueWith<TResult>(Func<Task, TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according to the condition specified in continuationOptions. (Inherited from Task.)
Public method ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes according 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. (Inherited from Task.)
Public method ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) Creates a continuation that executes when the target Task<TResult> completes.
Public method Dispose() Releases all resources used by the current instance of the Task class. (Inherited from Task.)
Protected method Dispose(Boolean) Disposes the Task, releasing all of its unmanaged resources. (Inherited from Task.)
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 it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAwaiter Gets an awaiter used to await this Task<TResult>.
Public method GetHashCode Serves as the default hash function. (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. (Inherited from Task.)
Public method RunSynchronously(TaskScheduler) Runs the Task synchronously on the TaskScheduler provided. (Inherited from Task.)
Public method Start() Starts the Task, scheduling it for execution to the current TaskScheduler. (Inherited from Task.)
Public method Start(TaskScheduler) Starts the Task, scheduling it for execution to the specified TaskScheduler. (Inherited from Task.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Wait() Waits for the Task to complete execution. (Inherited from Task.)
Public method Wait(CancellationToken) Waits for the cancellable Task to complete execution. (Inherited from Task.)
Public method Wait(Int32) Waits for the Task to complete execution within a specified number of milliseconds. (Inherited from Task.)
Public method Wait(TimeSpan) Waits for the Task to complete execution within a specified time interval. (Inherited from Task.)
Public method Wait(Int32, CancellationToken) Waits for the cancellable Task to complete execution. (Inherited from Task.)
Top

  Name Description
Public Extension Method AsAsyncAction Returns a Windows Runtime asynchronous action that represents a started task. (Defined by WindowsRuntimeSystemExtensions.)
Public Extension Method AsAsyncOperation<TResult> Returns a Windows Runtime asynchronous operation that represents a started task that returns a result. (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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft