Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="seq_"></param>
        /// <param name="stack_"></param>
        /// <param name="parent_"></param>
        public ProcessingContext(SequenceBase seq_, MemoryStackFrameManager stack_, ProcessingContext parent_ = null)
        {
            State = ProcessingContextState.Stop;

            m_FreeCallID++;
            CallID = m_FreeCallID;

            Parent           = parent_;
            SequenceBase     = seq_;
            MemoryStackFrame = stack_;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="seq_"></param>
        /// <param name="stack_"></param>
        /// <param name="parent_"></param>
        public ProcessingContext(SequenceBase seq_, MemoryStackFrameManager stack_, ProcessingContext parent_ = null)
        {
            State = ProcessingContextState.Stop;

            m_FreeCallID++;
            CallID = m_FreeCallID;

            Parent = parent_;
            SequenceBase = seq_;
            MemoryStackFrame = stack_;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="seq_"></param>
        /// <param name="eventType_"></param>
        /// <param name="index_"></param>
        /// <param name="param_"></param>
        public void LaunchSequence(SequenceBase seq_, Type eventType_, int index_, object param_)
        {
            MemoryStackFrameManager stackFrames = new MemoryStackFrameManager();

            //stackFrames.Clear();
            stackFrames.AddStackFrame(); // 1st frame
            seq_.AllocateAllVariables(stackFrames.CurrentFrame);
            ProcessingContext processContext = new ProcessingContext(seq_, stackFrames);

            seq_.OnEvent(processContext, eventType_, index_, param_);
            m_CallStacks.Add(processContext);

            Resume();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="seq_"></param>
        /// <param name="eventType_"></param>
        /// <param name="index_"></param>
        /// <param name="param_"></param>
        public void LaunchSequence(SequenceBase seq_, Type eventType_, int index_, object param_)
        {
            MemoryStackFrameManager stackFrames = new MemoryStackFrameManager();
            //stackFrames.Clear();
            stackFrames.AddStackFrame(); // 1st frame
            seq_.AllocateAllVariables(stackFrames.CurrentFrame);
            ProcessingContext processContext = new ProcessingContext(seq_, stackFrames);
            seq_.OnEvent(processContext, eventType_, index_, param_);
            m_CallStacks.Add(processContext);

            Resume();
        }