public IRule Return(IEnumerable<StateCreationRule> stateCreationRules, CreateNextStateDelegate defaultCreateNextStateDelegate = null) { Check.IsNotNull(stateCreationRules, "stateCreationRules"); if (defaultCreateNextStateDelegate == null) { return new Rule(condition, requestAction, new StateFactoryCollection(stateCreationRules)); } var stateFactoryCollection = new StateFactoryCollection(stateCreationRules, (r, v, c) => defaultCreateNextStateDelegate(r, v)); return new Rule(condition, requestAction, stateFactoryCollection); }
public CreateNextState(CreateNextStateDelegate createNextStateDelegate) { this.createNextStateDelegate = createNextStateDelegate; }
public IRule ReturnState(CreateNextStateDelegate createNextStateDelegate) { return new Rule(condition, requestAction, new CreateNextState(createNextStateDelegate)); }
public StateCreationRule Do(CreateNextStateDelegate createNextStateDelegate) { return new StateCreationRule(condition, new CreateNextState(createNextStateDelegate)); }