// Clone execution, keeping a reference to the same definition.
        public FiniteStateMachineExecutionById Clone()
        {
            var newExecutionById = new FiniteStateMachineExecutionById();

            newExecutionById.definition = this.definition;
            newExecutionById.state      = this.state;
            return(newExecutionById);
        }
Ejemplo n.º 2
0
 /* This constructor creates a finite state machine execution from a finite state machine definition.
  * The created machine starts at the initial state (defined in the definition).
  */
 public FiniteStateMachineExecution(FiniteStateMachineDefinition <TAlphabet, TState> machineDefinition)
 {
     definition    = machineDefinition;
     executionById = new FiniteStateMachineExecutionById(machineDefinition.definitionById);
 }