Пример #1
0
 public static FlowActions <T> StartActionsGroup <T>(
     this FlowActions <T> actions,
     String text,
     Action <FlowActions <T> > groupActions)
 {
     return(actions.Add(new ActionsGroupAction <T>(groupActions)
     {
         Text = text
     }));
 }
Пример #2
0
        public static FlowActions <T> If <T>(
            this FlowActions <T> actions,
            Func <FlowContext <T>, Boolean> condition,
            Action <FlowActions <T> > trueActions,
            Action <FlowActions <T> > falseActions)
        {
            IFlowAction <T> ifaction = new IfAction <T>(condition, trueActions).Else(falseActions);

            return(actions.Add(ifaction));
        }
Пример #3
0
        public static FlowActions <T> Else <T>(
            this IfFlowActions <T> ifactions,
            Action <FlowActions <T> > action,
            String actionText = Defaults.ConditionActionText)
        {
            ifactions.IfAction.Else(action, actionText);

            var actions = new FlowActions <T>(ifactions);

            actions.Add(ifactions.IfAction);

            return(actions);
        }
Пример #4
0
        //public static FlowActions<T> Set<T>(this FlowActions<T> tasks, Action<T> model)
        //{
        //    return tasks.Add(new SetVariableAction<T>(model));
        //}

        public static FlowActions <T> Set <T>(this FlowActions <T> tasks, Action <FlowContext <T> > context)
        {
            return(tasks.Add(new SetVariableAction <T>(context)));
        }
Пример #5
0
 public static FlowActions <T> Set <T>(this FlowActions <T> tasks, String name, DateTime value)
 {
     return(tasks.Add(new SetVariableAction <T>(name, value)));
 }
Пример #6
0
 public static FlowActions <T> WriteLine <T>(this FlowActions <T> task, String text)
 {
     return(task.Add(new PromptAction <T>(text)));
 }
Пример #7
0
 public static FlowActions <T> StartActionsGroup <T>(
     this FlowActions <T> actions,
     Action <FlowActions <T> > groupActions)
 {
     return(actions.Add(new ActionsGroupAction <T>(groupActions)));
 }
Пример #8
0
 public static FlowActions <T> Action <T>(this FlowActions <T> tasks, String text, Action <FlowContext <T> > action)
 {
     return(tasks.Add(new AdHocAction <T>(text, action)));
 }