ExecutionType 枚举

定义

警告

此 API 现已过时。

指定活动的执行模式。Specifies the execution mode for activities.

public enum class ExecutionType
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public enum ExecutionType
type ExecutionType = 
Public Enum ExecutionType
继承
ExecutionType
属性

字段

Parallel 1

并行执行活动。Executes activities in parallel.

Sequence 0

依次执行活动。Executes activities in sequential order. 每个活动按顺序在前一个活动执行完成后执行。Each activity is executed in turn, after the previous activity has finished running.

示例

下面的代码示例演示如何使用 ExecutionType 枚举设置活动的执行模式。The following code example shows how to set the execution mode for activities using the ExecutionType enumeration. 此代码示例摘自 Simplereplicatorworkflow.cs 文件中的“复制器”SDK 示例。This code example is part of the Replicator SDK Sample from the Simplereplicatorworkflow.cs file. 有关详细信息, 请参阅使用复制器。For more information, see Using Replicator.

this.CanModifyActivities = true;
System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
this.throwActivity1 = new System.Workflow.ComponentModel.ThrowActivity();
activitybind1.Name = "ThrowWorkflow";
activitybind1.Path = "ThrownException";
// 
// throwActivity1
// 
this.throwActivity1.Name = "throwActivity1";
this.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
// 
// ThrowWorkflow
// 
this.Activities.Add(this.throwActivity1);
this.Name = "ThrowWorkflow";
this.CanModifyActivities = false;
Me.CanModifyActivities = True
Dim activitybind1 As New System.Workflow.ComponentModel.ActivityBind()
Me.throwActivity1 = New System.Workflow.ComponentModel.ThrowActivity()
activitybind1.Name = "ThrowWorkflow"
activitybind1.Path = "ThrownException"
' 
' throwActivity1
' 
Me.throwActivity1.Name = "throwActivity1"
Me.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, activitybind1)
' 
' ThrowWorkflow
' 
Me.Activities.Add(Me.throwActivity1)
Me.Name = "ThrowWorkflow"
Me.CanModifyActivities = False

注解

备注

本材料讨论的类型和命名空间已废弃不用。This material discusses types and namespaces that are obsolete. 有关详细信息,请参阅 Windows Workflow Foundation 4.5 中弃用的类型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

适用于