Share via


VsTaskContinuationOptions Enumeration

Specifies the task’s continuation options.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaration
<FlagsAttribute> _
Public Enumeration VsTaskContinuationOptions
[FlagsAttribute]
public enum VsTaskContinuationOptions
[FlagsAttribute]
public enum class VsTaskContinuationOptions
[<FlagsAttribute>]
type VsTaskContinuationOptions
public enum VsTaskContinuationOptions

Members

Member name Description
AttachedToParent The task is attached to a parent in the task hierarchy. The parent task is not marked as completed until this child task is completed as well.
Default The same as NotOnFaulted.
DenyChildAttach An InvalidOperationException is thrown if an attempt is made to attach a child task to the created task.
ExecuteSynchronously The continuation task should be executed synchronously. With this option specified, the continuation is run on the same thread that causes the antecedent task to transition into its final state. If the antecedent is already complete when the continuation is created, the continuation is run on the thread creating the continuation. Only very short-running continuations should be executed synchronously.
IndependentlyCanceled The task can be canceled independently of any other task.
LazyCancelation In the case of continuation cancellation, prevents completion of the continuation until the antecedent has completed.
LongRunning The task is a long-running, course-grained operation. It provides a hint to the task library that oversubscription may be warranted.
None Default = "Continue on any, no task options, run asynchronously" Specifies that the default behavior should be used. Continuations, by default, are scheduled when the antecedent task completes, regardless of the task's final state.
NotCancelable The continuation task cannot be canceled.
NotOnCanceled The continuation task should not be scheduled if its antecedent was canceled. This option is not valid for multi-task continuations.
NotOnFaulted The continuation task should not be scheduled if its antecedent threw an unhandled exception. This option is not valid for multi-task continuations.
NotOnRanToCompletion The continuation task should not be scheduled if its antecedent ran to completion. This option is not valid for multi-task continuations.
OnlyOnFaulted The continuation task should be scheduled only if its antecedent threw an unhandled exception. This option is not valid for multi-task continuations.
OnlyOnRanToCompletion The continuation task should be scheduled only if its antecedent ran to completion. This option is not valid for multi-task continuations.
PreferFairness A hint to the task library to schedule a task in as fair a manner as possible, meaning that tasks scheduled sooner are more likely to be run sooner, and tasks scheduled later are more likely to be run later.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace