예제 #1
0
        /// <summary>
        /// Changes the Stage to the next stage/ or a substage
        /// </summary>
        /// <param name="name">Name of the next stage</param>
        /// <param name="finalize">If true it will end the last stage(e.g. its not a substage)</param>
        /// <returns></returns>
        private static EngineStageInformation ChangeStage(string name, bool finalize)
        {
            EngineStageInformation old = _current;

            if (finalize)
            {
                old?.FinalizeStage();
            }

            _current = new EngineStageInformation(name);
            return(old);
        }
예제 #2
0
        /// <summary>
        /// Returns to the next higher parent step(does nothing when in root)
        /// </summary>
        public static void ReturnFromSubStage()
        {
#if LEAK_TRACE
            if (_current != null)
            {
                _current.FinalizeStage();
                if (_current.Parent != null)
                {
                    _current = _current.Parent;
                }
            }
#endif
        }