VsTaskContinuationOptions 枚举

Specifies the task’s continuation options.

此枚举有一个 FlagsAttribute 特性,通过该特性可使其成员值按位组合。

命名空间:  Microsoft.VisualStudio.Shell
程序集:  Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)

语法

声明
<FlagsAttribute> _
Public Enumeration VsTaskContinuationOptions
[FlagsAttribute]
public enum VsTaskContinuationOptions

成员

成员名称 说明
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 TaskStatus.
PreferFairness A hint to a TaskScheduler 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.
LongRunning The task is a long-running, course-grained operation. It provides a hint to the TaskScheduler that oversubscription may be warranted.
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.
DenyChildAttach An InvalidOperationException is thrown if an attempt is made to attach a child task to the created task.
LazyCancelation In the case of continuation cancellation, prevents completion of the continuation until the antecedent has completed.
NotOnRanToCompletion The continuation task should not be scheduled if its antecedent ran to completion. 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.
NotOnCanceled The continuation task should not be scheduled if its antecedent was canceled. 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.
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.
NotCancelable The continuation task cannot be canceled.
Default The same as NotOnFaulted.

请参见

参考

Microsoft.VisualStudio.Shell 命名空间