Esempio n. 1
0
        /// <summary>
        /// Exits the method.
        /// </summary>
        static public void ExitMethod()
        {
            TraceThreadInfo threadInfo = RequestObjectManager.GetRequestObject();

            threadInfo.Pop();
            if (threadInfo.EndOfStack())
            {
                RequestObjectManager.RemoveRequest();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Enters the method.
        /// </summary>
        /// <param name="tracer">The tracer.</param>
        /// <returns></returns>
        static public TraceThreadInfo EnterMethod(IRITrace tracer)
        {
            TraceThreadInfo threadInfo = RequestObjectManager.GetRequestObject(out bool bNew);

            if (bNew)
            {
                // must be first calling thread (parent)
                threadInfo.RootTracer = tracer;
            }

            threadInfo.Push(tracer);

            return(threadInfo);
        }
Esempio n. 3
0
        /// <summary>
        /// Gets the active tracer.
        /// </summary>
        /// <returns></returns>
        static public IRITrace GetActiveTracer()
        {
            IRITrace tracer;

            TraceThreadInfo threadInfo = RequestObjectManager.GetRequestObject();

            if (threadInfo != null)
            {
                tracer = threadInfo.Peek();
            }
            else
            {
                tracer = null;
            }

            return(tracer ?? Default);
        }