Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            CallStack callStack = obj as CallStack;

            if (null == callStack || Session != callStack.Session ||
                Sequence != callStack.Sequence || callStack.StepStack.Count != StepStack.Count)
            {
                return(false);
            }
            for (int i = 0; i < StepStack.Count; i++)
            {
                if (StepStack[i] != callStack.StepStack[i])
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
        public static CallStack GetStack(int session, ISequenceStep step)
        {
            CallStack callStack = new CallStack();

            while (null != step)
            {
                callStack.StepStack.Insert(0, step.Index);
                ISequenceFlowContainer parent = step.Parent;
                if (parent is ISequence)
                {
                    callStack.Sequence = ((ISequence)parent).Index;
                    break;
                }
                step = parent as ISequenceStep;
            }
            callStack.Session = session;
            return(callStack);
        }