Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 /// <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;
 }
Exemplo n.º 3
0
 /// <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)
 {
 }
Exemplo n.º 4
0
 /// <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)
 {
 }
Exemplo n.º 5
0
 /// <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)
 {
 }
Exemplo n.º 6
0
 /// <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)
 {
 }
Exemplo n.º 7
0
 /// <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)
 {
 }
Exemplo n.º 8
0
 /// <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)
 {
 }