本文整理汇总了C#中System.Workflow.Runtime.WorkflowRuntime.GetService方法的典型用法代码示例。如果您正苦于以下问题:C# WorkflowRuntime.GetService方法的具体用法?C# WorkflowRuntime.GetService怎么用?C# WorkflowRuntime.GetService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Workflow.Runtime.WorkflowRuntime
的用法示例。
在下文中一共展示了WorkflowRuntime.GetService方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateNewBranch
protected override CompositeActivity OnCreateNewBranch()
{
return new ParallelIfBranch();
}
private void OnAddBranch(object sender, EventArgs e)
{
CompositeActivity activity1 = this.OnCreateNewBranch();
CompositeActivity activity2 = base.Activity as CompositeActivity;
if ((activity2 != null) && (activity1 != null))
{
int num1 = this.ContainedDesigners.Count;
Activity[] activityArray1 = new Activity[] { activity1 };
if (CanInsertActivities(new ConnectorHitTestInfo(this, HitTestLocations.Designer, activity2.Activities.Count),
new List<Activity>(activityArray1).AsReadOnly()))
{
CompositeActivityDesigner.InsertActivities(this,
new ConnectorHitTestInfo(this, HitTestLocations.Designer, activity2.Activities.Count),
new List<Activity>(activityArray1).AsReadOnly(),
string.Format("Adding branch {0}", activity1.GetType().Name));
if ((this.ContainedDesigners.Count > num1) && (this.ContainedDesigners.Count > 0))
{
this.ContainedDesigners[this.ContainedDesigners.Count - 1].EnsureVisible();
}
}
}
}