ExecutionType 枚举

定义

注意

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

指定活动的执行模式。

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

字段

名称 说明
Parallel 1

并行执行活动。

Sequence 0

依次执行活动。 每个活动按顺序在前一个活动执行完成后执行。

示例

下面的代码示例演示如何使用 ExecutionType 枚举设置活动的执行模式。 此代码示例摘自 Simplereplicatorworkflow.cs 文件中的“复制器”SDK 示例。 有关详细信息,请参阅 使用复制程序

C#
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;

注解

备注

本材料讨论的类型和命名空间已废弃不用。 有关详细信息,请参阅 Windows Workflow Foundation 4.5 中弃用的类型

适用于

产品 版本 (已过时)
.NET Framework 3.0, 3.5, 4.0 (4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)