Επεξεργασία

Κοινή χρήση μέσω


FlowDecision.Condition Property

Definition

Specifies the condition the FlowDecision is testing.

public:
 property System::Activities::Activity<bool> ^ Condition { System::Activities::Activity<bool> ^ get(); void set(System::Activities::Activity<bool> ^ value); };
public System.Activities.Activity<bool> Condition { get; set; }
member this.Condition : System.Activities.Activity<bool> with get, set
Public Property Condition As Activity(Of Boolean)

Property Value

A value expression that represents the condition.

Examples

The following code sample demonstrates using the Condition property of 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
};

Remarks

If the condition evaluates to true, the FlowNode in the True property is executed. Otherwise the FlowNode in the False property is executed.

Applies to