ExecutionType 列舉

定義

警告

此 API 現已淘汰。

指定活動的執行模式。Specifies the execution mode for activities.

public enum class ExecutionType
public enum 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.

適用於