Which code segment should you use?

You create a workflow application by using Microsoft .NET Framework 3.5. Your application has a workflow that contains an IfElseActivity activity. The activity has a branch named IfElseBranchA. You need to create a code condition event handler to ensure that the IfElseBranchA activity is always executed. Which code segment should you use?

You create a workflow application by using Microsoft .NET Framework 3.5. Your application has a workflow that contains an IfElseActivity activity. The activity has a branch named IfElseBranchA. You need to create a code condition event handler to ensure that the IfElseBranchA activity is always executed. Which code segment should you use?

A.
private void MyCondition(object sender, ConditionalEventArgs e){ e.Result = true;}

B.
private void MyCondition(object sender, ConditionalEventArgs e){ IfElseBranchActivity act = sender as IfElseBranchActivity; act.Enabled = true;}

C.
private void MyCondition(object sender, ConditionalEventArgs e){ IfElseBranchActivity act = sender as IfElseBranchActivity; act.Condition.SetValue(DependencyProperty.FromName( "ExecutionResult", typeof(bool)), true);}

D.
private void MyCondition(object sender, ConditionalEventArgs e){ IfElseBranchActivity act = sender as IfElseBranchActivity; act.Condition.SetValue(DependencyProperty.FromName( "Condition", typeof(bool)), true);}



Leave a Reply 0

Your email address will not be published. Required fields are marked *