Exemplo n.º 1
0
        public static StateConfigurator <TWorkflow, TInstance> DuringAny <TWorkflow, TInstance>(
            this StateMachineConfigurator <TWorkflow, TInstance> stateMachineConfigurator)
            where TWorkflow : class
            where TInstance : class
        {
            var stateConfigurator = new AnyStateConfigurator <TWorkflow, TInstance>();

            stateMachineConfigurator.AddConfigurator(stateConfigurator);

            return(stateConfigurator);
        }
Exemplo n.º 2
0
        public static StateConfigurator <TWorkflow, TInstance> Initially <TWorkflow, TInstance>(
            this StateMachineConfigurator <TWorkflow, TInstance> stateMachineConfigurator,
            Action <StateConfigurator <TWorkflow, TInstance> > configurationAction)
            where TWorkflow : class
            where TInstance : class
        {
            var configurator = new StateConfiguratorImpl <TWorkflow, TInstance>(stateMachineConfigurator,
                                                                                StateMachineWorkflow.InitialStateName);

            stateMachineConfigurator.AddConfigurator(configurator);

            configurationAction(configurator);

            return(configurator);
        }
Exemplo n.º 3
0
        public static StateConfigurator <TWorkflow, TInstance> During <TWorkflow, TInstance>(
            this StateMachineConfigurator <TWorkflow, TInstance> stateMachineConfigurator,
            Expression <Func <TWorkflow, State> > stateExpression,
            Action <StateConfigurator <TWorkflow, TInstance> > configurationAction)
            where TWorkflow : class
            where TInstance : class
        {
            var configurator = new StateConfiguratorImpl <TWorkflow, TInstance>(stateMachineConfigurator, stateExpression);

            stateMachineConfigurator.AddConfigurator(configurator);

            configurationAction(configurator);

            return(configurator);
        }