Esempio n. 1
0
        public void StopTrace()
        {
            int          threadId     = Thread.CurrentThread.ManagedThreadId;
            ThreadTracer threadTracer = traceResult.GetThreadTracer(threadId);

            if (threadTracer != null)
            {
                threadTracer.StopTrace();
            }
            else
            {
                throw new InvalidOperationException("There are no one method to stop tracing");
            }
        }
Esempio n. 2
0
        public void StopTrace()
        {
            ThreadTracer threadTracer = GetCurrentThreadTracer();

            threadTracer.StopTrace();
            int currentThreadId          = Thread.CurrentThread.ManagedThreadId;
            ThreadInformation threadInfo = GetThreadInfoById(currentThreadId);

            if (threadInfo == null)
            {
                List <MethodInformation> threadMethodInfos = threadTracer.GetThreadMethodList();
                threadInfo = new ThreadInformation(currentThreadId, threadMethodInfos);
                _threadsInfo.TryAdd(currentThreadId, threadInfo);
            }
        }