/// <summary> /// Initializes a new instance of FunctionState /// </summary> /// <param name="stateNumber">The zero-based index of the state</param> /// <param name="isAccept">Indicates if the state is an accept state of the state machine</param> /// <param name="stateFunction">SMStateFuncion delegate which points to the method /// to be executed as state function of the state machine</param> /// <param name="stateFunctionParameters">The parameters to be pased to the state function</param> public FunctionState(int stateNumber, SMStateFuncion stateFunction, bool isAccept, object stateFunctionParameters) { this.isAcceptState = isAccept; if (stateNumber < 0) throw new ArgumentOutOfRangeException("Parameter stateNumber must be greater or equal than zero"); this.stateNumber = stateNumber; if (stateFunction == null) throw new ArgumentNullException(); this.stateFunction = stateFunction; this.stateFunctionParameters = stateFunctionParameters; }
/// <summary> /// Initializes a new instance of FunctionState /// </summary> /// <param name="stateNumber">The zero-based index of the state</param> /// <param name="isAccept">Indicates if the state is an accept state of the state machine</param> /// <param name="stateFunction">SMStateFuncion delegate which points to the method /// to be executed as state function of the state machine</param> /// <param name="stateFunctionParameters">The parameters to be pased to the state function</param> public FunctionState(int stateNumber, SMStateFuncion stateFunction, bool isAccept, object stateFunctionParameters) { this.isAcceptState = isAccept; if (stateNumber < 0) { throw new ArgumentOutOfRangeException("Parameter stateNumber must be greater or equal than zero"); } this.stateNumber = stateNumber; if (stateFunction == null) { throw new ArgumentNullException(); } this.stateFunction = stateFunction; this.stateFunctionParameters = stateFunctionParameters; }
/// <summary> /// Initializes a new instance of FunctionState /// </summary> /// <param name="stateNumber">The zero-based index of the state</param> /// <param name="stateFunction">SMStateFuncion delegate which points to the method /// to be executed as state function of the state machine</param> /// <param name="stateFunctionParameters">The parameters to be pased to the state function</param> public FunctionState(int stateNumber, SMStateFuncion stateFunction, object stateFunctionParameters) : this(stateNumber, stateFunction, false, stateFunctionParameters) { }
/// <summary> /// Initializes a new instance of FunctionState /// </summary> /// <param name="stateNumber">The zero-based index of the state</param> /// <param name="isAccept">Indicates if the state is an accept state of the state machine</param> /// <param name="stateFunction">SMStateFuncion delegate which points to the method /// to be executed as state function of the state machine</param> public FunctionState(int stateNumber, SMStateFuncion stateFunction, bool isAccept) : this(stateNumber, stateFunction, isAccept, null) { }
/// <summary> /// Initializes a new instance of FunctionState /// </summary> /// <param name="stateNumber">The zero-based index of the state</param> /// <param name="stateFunction">SMStateFuncion delegate which points to the method /// to be executed as state function of the state machine</param> public FunctionState(int stateNumber, SMStateFuncion stateFunction) : this(stateNumber, stateFunction, false, null) { }