Get All Activities
Last changed: -80.126.16.139

.
Summary
Public Shared Function GetAllActivities(ByVal root As Activity) As List(Of Activity)
    Dim result As New List(Of Activity)
    Dim i As Integer = 0
    Dim current As Activity
    result.Add(root)
 
    While i < result.Count
        current = result(i)
        Dim ca As CompositeActivity = TryCast(current, CompositeActivity)
 
        If ca IsNot Nothing Then
            result.AddRange(ca.Activities)
        End If
        i += 1
    End While
 
    Return result
End Function