/// <summary> /// Exits the method. /// </summary> static public void ExitMethod() { TraceThreadInfo threadInfo = RequestObjectManager.GetRequestObject(); threadInfo.Pop(); if (threadInfo.EndOfStack()) { RequestObjectManager.RemoveRequest(); } }
/// <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); }
/// <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); }