本文整理匯總了VB.NET中System.Workflow.Runtime.WorkflowRuntime.GetService方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET WorkflowRuntime.GetService方法的具體用法?VB.NET WorkflowRuntime.GetService怎麽用?VB.NET WorkflowRuntime.GetService使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Workflow.Runtime.WorkflowRuntime
的用法示例。
在下文中一共展示了WorkflowRuntime.GetService方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: OnAddBranch
Protected Overrides Function OnCreateNewBranch() As CompositeActivity
Return New ParallelIfBranch()
End Function
Private Sub OnAddBranch(ByVal sender As Object, ByVal e As EventArgs)
Dim activity1 As CompositeActivity = Me.OnCreateNewBranch()
Dim activity2 As CompositeActivity = CType(MyBase.Activity, CompositeActivity)
If (activity2 IsNot Nothing) And (activity1 IsNot Nothing) Then
Dim num1 As Integer = Me.ContainedDesigners.Count
Dim activityArray1() As Activity = {activity1}
If (CanInsertActivities(New ConnectorHitTestInfo(Me, HitTestLocations.Designer, activity2.Activities.Count), _
New List(Of Activity)(activityArray1).AsReadOnly())) Then
CompositeActivityDesigner.InsertActivities(Me, _
New ConnectorHitTestInfo(Me, HitTestLocations.Designer, activity2.Activities.Count), _
New List(Of Activity)(activityArray1).AsReadOnly(), _
String.Format("Adding branch 0}", activity1.GetType().Name))
If (Me.ContainedDesigners.Count > num1) And (Me.ContainedDesigners.Count > 0) Then
Me.ContainedDesigners(Me.ContainedDesigners.Count - 1).EnsureVisible()
End If
End If
End If
End Sub