Edit

Share via


FlowDecision Constructors

Definition

Creates a new instance of the FlowDecision class.

Overloads

FlowDecision()

Creates a new instance of the FlowDecision class.

FlowDecision(Activity<Boolean>)

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

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

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

Examples

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
};

FlowDecision()

Creates a new instance of the FlowDecision class.

public:
 FlowDecision();
public FlowDecision ();
Public Sub New ()

Examples

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
};

Applies to

FlowDecision(Activity<Boolean>)

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

public:
 FlowDecision(System::Activities::Activity<bool> ^ condition);
public FlowDecision (System.Activities.Activity<bool> condition);
new System.Activities.Statements.FlowDecision : System.Activities.Activity<bool> -> System.Activities.Statements.FlowDecision
Public Sub New (condition As Activity(Of Boolean))

Parameters

condition
Activity<Boolean>

The condition the FlowDecision is testing.

Examples

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
};

Applies to

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

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

public:
 FlowDecision(System::Linq::Expressions::Expression<Func<System::Activities::ActivityContext ^, bool> ^> ^ condition);
public FlowDecision (System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext,bool>> condition);
new System.Activities.Statements.FlowDecision : System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext, bool>> -> System.Activities.Statements.FlowDecision
Public Sub New (condition As Expression(Of Func(Of ActivityContext, Boolean)))

Parameters

condition
Expression<Func<ActivityContext,Boolean>>

The condition the FlowDecision is testing.

Examples

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
};

Applies to