Esempio n. 1
0
        public ISchematicBuilder <TState, TInput> WithStates(params TState[] states)
        {
            foreach (var state in states)
            {
                var stateConfiguration = new StateBuilder <TState, TInput>(this, state);

                _stateConfigurations.Add(state, stateConfiguration);
            }

            return(this);
        }
Esempio n. 2
0
        public ISchematicBuilder <TState, TInput> WithState(
            TState state,
            System.Action <IStateBuilder <TState, TInput> > stateBuilderAction = null)
        {
            var stateConfiguration = new StateBuilder <TState, TInput>(this, state);

            _stateConfigurations.Add(stateConfiguration.Value, stateConfiguration);

            stateBuilderAction?.Invoke(stateConfiguration);

            return(this);
        }
Esempio n. 3
0
        public ISchematicBuilder <TState, TInput> WithStates(
            ICollection <TState> states,
            System.Action <IStateBuilder <TState, TInput> > stateBuilderAction = null)
        {
            foreach (var state in states)
            {
                var stateConfiguration = new StateBuilder <TState, TInput>(this, state);

                _stateConfigurations.Add(state, stateConfiguration);
            }

            foreach (var state in states)
            {
                var stateConfiguration = _stateConfigurations[state];

                stateBuilderAction?.Invoke(stateConfiguration);
            }

            return(this);
        }