public IWorkflowConditionalActivity ThenIf(Func <object, bool> condition, Action <IWorkflowActivity> ifTrue, Action <IWorkflowActivity> @else)
        {
            var activity = new SequentialWorkflowConditionalActivity(Workflow, condition, this);

            var ifTrueActivity = new SequentialWorkflowActivity(Workflow, null, this);

            ifTrue(ifTrueActivity);
            activity.IfTrueActivity = ifTrueActivity.NextActivity;


            var elseActivity = new SequentialWorkflowActivity(Workflow, null, this);

            @else(elseActivity);
            activity.ElseActivity = elseActivity.NextActivity;

            NextActivity = activity;

            return(activity);
        }
 private IWorkflowActivity Then(MethodBase method)
 {
     return(NextActivity = new SequentialWorkflowActivity(Workflow, method, this));
 }
 private IWorkflowActivity Then(MethodBase method, Func <object, object> binding)
 {
     return(NextActivity = new SequentialWorkflowActivity(Workflow, method, this, binding));
 }
 private SequentialWorkflowActivity(IWorkflow workflow, MethodBase method, SequentialWorkflowActivity previous, Func <object, object> binding)
     : this(workflow, method, previous)
 {
     Binding = binding;
 }