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)); }
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); }
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); }