コード例 #1
0
ファイル: MemoryTracer.cs プロジェクト: ByteChkR/Minor
        /// <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
ファイル: MemoryTracer.cs プロジェクト: ByteChkR/Minor
        /// <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
        }