Microsoft.Zing.Process.Clone C# (CSharp) Méthode

Clone() private méthode

private Clone ( StateImpl myState, bool shallowCopy ) : object
myState StateImpl
shallowCopy bool
Résultat object
        internal object Clone(StateImpl myState, bool shallowCopy)
        {
            Process clone = new Process(myState, Name, Id);

            clone.atomicityLevel = this.atomicityLevel;
            clone.middleOfTransition = this.middleOfTransition;
            clone.backTransitionEncountered = this.backTransitionEncountered;
            clone.choicePending = this.choicePending;
            // For parallel exploration
            clone.myThreadId = myState.MySerialNum;

            // Recursively clone the entire stack
            if (this.topOfStack != null)
                clone.topOfStack = this.topOfStack.Clone(myState, clone, shallowCopy);

            if (this.lastFunctionCompleted != null)
            {
                Debug.Fail("cannot happen anymore (xyc)");
                clone.lastFunctionCompleted = this.lastFunctionCompleted.Clone(myState, clone, true);
            }

            return clone;
        }