WhenStageAllowed <TWf>(this IFluentConfigurator <IWorkflowConditionalObject <TWf> > c, Func <TWf, Workflow <TWf> .Stage> getStage)
            where TWf : class, IWorkflow <TWf>
        {
            var cond = new WorkflowCondition <TWf>(w =>
                                                   getStage(w).Check(w) == WorkflowConditionResult.Passed
                    ? WorkflowConditionResult.Passed
                    : WorkflowConditionResult.Failed);

            cond.SetMessage(w => getStage(w).GetMessages(w));
            cond.SetHighlights(w => getStage(w).GetHighlights(w));

            c?.Target.AddCondition(cond);
            return(c);
        }
示例#2
0
 public void SetNext(WorkflowCondition <T> next) => _next = next;
示例#3
0
 void IWorkflowConditionalObject <T> .AddCondition(WorkflowCondition <T> condition)
 {
     condition.SetNext(Condition);
     Condition = condition;
 }