Click or drag to resize
CoreTaskExtensions Class
Provides extension methods for efficiently creating Task continuations, with automatic handling of faulted and canceled antecedent tasks.
Inheritance Hierarchy
SystemObject
  Rackspace.ThreadingCoreTaskExtensions

Namespace: Rackspace.Threading
Assembly: Rackspace.Threading (in Rackspace.Threading.dll) Version: 2.1.0-beta1
Syntax
public static class CoreTaskExtensions

The CoreTaskExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCatchTException(Task, ActionTask, TException)
Synchronously execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberCatchTException(Task, FuncTask, TException, Task)
Execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberCatchTException(Task, PredicateTException, ActionTask, TException)
Synchronously execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, or if the specified filter does not match the exception instance, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberCatchTException(Task, PredicateTException, FuncTask, TException, Task)
Execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, or if the specified filter does not match the exception instance, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberCatchTException, TResult(TaskTResult, FuncTaskTResult, TException, TaskTResult)
Execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberCatchTException, TResult(TaskTResult, FuncTaskTResult, TException, TResult)
Synchronously execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberCatchTException, TResult(TaskTResult, PredicateTException, FuncTaskTResult, TException, TaskTResult)
Execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, or if the specified filter does not match the exception instance, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberCatchTException, TResult(TaskTResult, PredicateTException, FuncTaskTResult, TException, TResult)
Synchronously execute an exception handling continuation when a task completes in the Canceled or Faulted state. If the antecedent task completes successfully, or if the Exception it provides is not a TException wrapped in an AggregateException, or if the specified filter does not match the exception instance, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberFinally(Task, ActionTask)
Synchronously execute a cleanup continuation when a task completes, regardless of the final Status of the task. If the cleanup action completes successfully, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the faulted or canceled cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberFinally(Task, FuncTask, Task)
Execute a cleanup continuation task when a task completes, regardless of the final Status of the antecedent task. If the cleanup action completes successfully, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the faulted or canceled cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberFinallyTResult(TaskTResult, ActionTaskTResult)
Synchronously execute a cleanup continuation when a task completes, regardless of the final Status of the task. If the cleanup action completes successfully, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the faulted or canceled cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberFinallyTResult(TaskTResult, FuncTaskTResult, Task)
Execute a cleanup continuation task when a task completes, regardless of the final Status of the antecedent task. If the cleanup action completes successfully, the status of the antecedent is directly applied to the task returned by this method. Otherwise, the status of the faulted or canceled cleanup operation is directly applied to the task returned by this method.
Public methodStatic memberObserveExceptionsTTask
This method ensures the exception for a faulted task is "observed", i.e. the Exception property will be accessed if the task enters the Faulted state.
Public methodStatic memberSelect(Task, ActionTask)
Synchronously execute a continuation when a task completes successfully.
Public methodStatic memberSelect(Task, ActionTask, Boolean)
Synchronously execute a continuation when a task completes. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Public methodStatic memberSelectTResult(Task, FuncTask, TResult)
Synchronously execute a continuation when a task completes successfully.
Public methodStatic memberSelectTSource(TaskTSource, ActionTaskTSource)
Synchronously execute a continuation when a task completes successfully.
Public methodStatic memberSelectTResult(Task, FuncTask, TResult, Boolean)
Synchronously execute a continuation when a task completes. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Public methodStatic memberSelectTSource(TaskTSource, ActionTaskTSource, Boolean)
Synchronously execute a continuation when a task completes. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Public methodStatic memberSelectTSource, TResult(TaskTSource, FuncTaskTSource, TResult)
Synchronously execute a continuation when a task completes successfully.
Public methodStatic memberSelectTSource, TResult(TaskTSource, FuncTaskTSource, TResult, Boolean)
Synchronously execute a continuation when a task completes. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Public methodStatic memberThen(Task, FuncTask, Task)
Execute a continuation task when a task completes successfully. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method.
Public methodStatic memberThen(Task, FuncTask, Task, Boolean)
Execute a continuation task when a task completes. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Public methodStatic memberThenTResult(Task, FuncTask, TaskTResult)
Execute a continuation task when a task completes successfully. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method.
Public methodStatic memberThenTSource(TaskTSource, FuncTaskTSource, Task)
Execute a continuation task when a task completes successfully. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method.
Public methodStatic memberThenTResult(Task, FuncTask, TaskTResult, Boolean)
Execute a continuation task when a task completes. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Public methodStatic memberThenTSource(TaskTSource, FuncTaskTSource, Task, Boolean)
Execute a continuation task when a task completes. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Public methodStatic memberThenTSource, TResult(TaskTSource, FuncTaskTSource, TaskTResult)
Execute a continuation task when a task completes successfully. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method.
Public methodStatic memberThenTSource, TResult(TaskTSource, FuncTaskTSource, TaskTResult, Boolean)
Execute a continuation task when a task completes. The continuation task is synchronously created by a continuation function, and then unwrapped to form the result of this method. The supportsErrors parameter specifies whether the continuation is executed if the antecedent task is faulted.
Top
Version Information

.NET for Windows Store apps

Supported in: Windows 8

.NET Framework

Supported in: 4.5, 4.0, 3.5

Portable Class Library

Supported in: Portable Class Library (Legacy), Portable Class Library

Threading Library

Supported in: 2.1, 2.0, 1.1, 1.0
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also