Inheritance: IStateMachineState
        public static StateMachineState AddState(this StateMachine stateMachine, ComponentState id)
        {
            if (stateMachine == null) throw new ArgumentNullException(nameof(stateMachine));
            if (id == null) throw new ArgumentNullException(nameof(id));

            var state = new StateMachineState(id);
            stateMachine.AddState(state);
            return state;
        }
        public static StateMachineState WithHighBinaryOutput(this StateMachineState stateMachineState, IBinaryOutput output)
        {
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            return(stateMachineState.WithBinaryOutput(output, BinaryState.High));
        }
Exemple #3
0
        public static StateMachineState AddState(this StateMachine stateMachine, StatefulComponentState id)
        {
            if (stateMachine == null)
            {
                throw new ArgumentNullException(nameof(stateMachine));
            }
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            var state = new StateMachineState(id);

            stateMachine.AddState(state);
            return(state);
        }
Exemple #4
0
        public static StateMachineState AddState(this StateMachine stateMachine, string id)
        {
            if (stateMachine == null)
            {
                throw new ArgumentNullException(nameof(stateMachine));
            }
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            var state = new StateMachineState(id);

            stateMachine.RegisterState(state);
            return(state);
        }