Exemple #1
0
        public void RemoveListener()
        {
            TestTraceListener listener = Listener;

            if (listener != null)
            {
                Trace.RemoveListener(listener);
            }
        }
Exemple #2
0
        public void RemoveListener()
        {
            TestTraceListener listener = Trace.Listeners.OfType <TestTraceListener>()
                                         .FirstOrDefault(x => x.TestId == TestContext.CurrentContext.Test.ID);

            if (listener != null)
            {
                Trace.RemoveListener(listener);
            }
        }