FlowDecision.True 属性

定义

获取或设置在条件计算为 true 时执行的 FlowNode

public:
 property System::Activities::Statements::FlowNode ^ True { System::Activities::Statements::FlowNode ^ get(); void set(System::Activities::Statements::FlowNode ^ value); };
[System.Windows.Markup.DependsOn("Condition")]
public System.Activities.Statements.FlowNode True { get; set; }
[<System.Windows.Markup.DependsOn("Condition")>]
member this.True : System.Activities.Statements.FlowNode with get, set
Public Property True As FlowNode

属性值

在条件的计算结果为 true 时执行的活动。

属性

示例

下面的代码示例演示如何设置 FlowDecision 节点的 True 属性。 此示例摘自 使用 TryCatch 的流程图活动中的错误处理 示例。

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

适用于