public PrtStateStack Clone() { var clone = new PrtStateStack(); foreach (var s in stateStack.Reverse()) { clone.stateStack.Push(s.Clone()); } return(clone); }
public PrtMachine() { this.instanceNumber = 0; this.fields = new List <PrtValue>(); this.eventValue = PrtValue.NullValue; this.stateStack = new PrtStateStack(); this.invertedFunStack = new PrtFunStack(); this.continuation = new PrtContinuation(); this.currentTrigger = PrtValue.NullValue; this.currentPayload = PrtValue.NullValue; this.currentStatus = PrtMachineStatus.Enabled; this.nextSMOperation = PrtNextStatemachineOperation.EntryOperation; this.stateExitReason = PrtStateExitReason.NotExit; this.stateImpl = null; }
public PrtMachine() { this.instanceNumber = 0; this.fields = new List <PrtValue>(); this.eventValue = PrtValue.@null; this.stateStack = new PrtStateStack(); this.invertedFunStack = new PrtFunStack(); this.continuation = new PrtContinuation(); this.currentTrigger = PrtValue.@null; this.currentPayload = PrtValue.@null; this.currentStatus = PrtMachineStatus.Enabled; this.nextSMOperation = PrtNextStatemachineOperation.ExecuteFunctionOperation; this.stateExitReason = PrtStateExitReason.NotExit; this.sends = new List <PrtEventValue>(); this.stateImpl = null; this.renamedName = null; this.isSafe = false; }