CompositeActivity.Activities 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取表示所有子活动的集合 ActivityCollection 的对象。
public:
property System::Workflow::ComponentModel::ActivityCollection ^ Activities { System::Workflow::ComponentModel::ActivityCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Workflow.ComponentModel.ActivityCollection Activities { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Activities : System.Workflow.ComponentModel.ActivityCollection
Public ReadOnly Property Activities As ActivityCollection
属性值
所有子活动的 ActivityCollection。
- 属性
示例
下面的代码演示如何创建活动并将其作为子级添加到复合活动中,还演示如何设置此类型的 CanModifyActivities 许可。
此代码示例摘自 ThrowWorkFlow.cs 文件中的“引发 SDK”示例。 有关详细信息,请参阅 “引发示例”。
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
注解
表示由复合活动管理的子活动的集合。 可以更新此集合。