FlowDecision Class

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

A specialized FlowNode that provides the ability to model a conditional node with two outcomes.

Namespace:   System.Activities.Statements
Assembly:  System.Activities (in System.Activities.dll)

System.Object
  System.Activities.Statements.FlowNode
    System.Activities.Statements.FlowDecision

public sealed class FlowDecision : FlowNode

NameDescription
System_CAPS_pubmethodFlowDecision()

Creates a new instance of the FlowDecision class.

System_CAPS_pubmethodFlowDecision(Activity<Boolean>)

Creates a new instance of the FlowDecision class with the specified condition.

System_CAPS_pubmethodFlowDecision(Expression<Func<ActivityContext, Boolean>>)

Creates a new instance of the FlowDecision class with the specified condition.

NameDescription
System_CAPS_pubpropertyCondition

Specifies the condition the FlowDecision is testing.

System_CAPS_pubpropertyDisplayName

The name of this flow decision to be displayed in the activity designer.

System_CAPS_pubpropertyFalse

Gets or sets the FlowNode that is executed when the condition evaluates to false.

System_CAPS_pubpropertyTrue

Gets or sets the FlowNode that is executed when the condition evaluates to true.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

FlowDecision uses a condition and defines actions to take if the condition is true or false.

The following code sample demonstrates creating a FlowDecision node. This example is from the Fault Handling in a Flowchart Activity Using TryCatch sample.

FlowDecision flowDecision = new FlowDecision 
{
    Condition = ExpressionServices.Convert<bool>((ctx) => discount.Get(ctx) > 0),
    True = discountApplied,
    False = discountNotApplied
};

.NET Framework
Available since 4.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: