Files
dotnet-bot 332534dede Adding reference source for part of Workflow Foundation
Adding reference source for
System.Activities
System.Activities.DurableInstancing
System.Activities.Presentation
System.Runtime.DurableInstancing
System.Workflow.Activities
System.Workflow.ComponentModel
System.Workflow.Runtime
System.WorkflowServices
System.Xaml.Hosting
XamlBuildTask
2016-05-03 00:07:54 +02:00

74 lines
1.8 KiB
C#

//-----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.Activities.Statements
{
using System.Collections.Generic;
using System.Activities;
using System.ComponentModel;
using System.Windows.Markup;
[ContentProperty("Action")]
public sealed class FlowStep : FlowNode
{
public FlowStep()
{
}
[DefaultValue(null)]
public Activity Action
{
get;
set;
}
[DefaultValue(null)]
[DependsOn("Action")]
public FlowNode Next
{
get;
set;
}
internal override void OnOpen(Flowchart owner, NativeActivityMetadata metadata)
{
}
internal override void GetConnectedNodes(IList<FlowNode> connections)
{
if (Next != null)
{
connections.Add(Next);
}
}
internal override Activity ChildActivity
{
get { return Action; }
}
internal bool Execute(NativeActivityContext context, CompletionCallback onCompleted, out FlowNode nextNode)
{
if (Next == null)
{
if (TD.FlowchartNextNullIsEnabled())
{
TD.FlowchartNextNull(this.Owner.DisplayName);
}
}
if (Action == null)
{
nextNode = Next;
return true;
}
else
{
context.ScheduleActivity(Action, onCompleted);
nextNode = null;
return false;
}
}
}
}