ActivityCollection Class
Models a strongly typed ICollection of type Activity.
Assembly: System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
This class is used to represent the list of child activities for a CompositeActivity.
Note: |
|---|
Only call methods derived from IList(Of T) and not List(Of T), such as using Add to add activities instead of AddRange. Calling methods derived from List(Of T) will have unexpected consequences. |
The following example shows access of the ActivityCollection which is the member of a composite activity class containing all child activities. This code example is part of the Using Throw SDK Sample and is from the ThrowWorkflow.cs file. For more information, see Using the ThrowActivity Activity.
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
System.Collections.Generic.List(Of Activity)
System.Workflow.ComponentModel.ActivityCollection
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: