Example #1
0
        public static void SetTrace(SourceLevels level, TraceOptions options)
        {
            if (_Listener == null)
            {
                _Listener = new BindingErrorTraceListener();
                PresentationTraceSources.DataBindingSource.Listeners.Add(_Listener);
            }

            _Listener.TraceOutputOptions = options;
            PresentationTraceSources.DataBindingSource.Switch.Level = level;
        }
Example #2
0
        public static void CloseTrace()
        {
            if (_Listener == null)
            {
                return;
            }

            _Listener.Flush();
            _Listener.Close();
            PresentationTraceSources.DataBindingSource.Listeners.Remove(_Listener);
            _Listener = null;
        }
Example #3
0
 private static void SetBindingErrorTraceListener()
 {
     BindingErrorTraceListener.SetTrace();
 }