/// <summary> /// Closes the trace. /// </summary> public static void CloseTrace() { if( _listener == null ) { return; } _listener.Flush(); _listener.Close(); PresentationTraceSources.DataBindingSource.Listeners.Remove( _listener ); _listener = null; }
/// <summary> /// Closes the trace. /// </summary> public static void CloseTrace() { if (_listener == null) { return; } _listener.Flush(); _listener.Close(); PresentationTraceSources.DataBindingSource.Listeners.Remove(_listener); _listener = null; }
/// <summary> /// Initializes the trace listener only if there is a debugger attached. /// </summary> /// <param name="level">The level.</param> /// <param name="options">The options.</param> public static void Initialize( SourceLevels level, TraceOptions options ) { if( Debugger.IsAttached ) { if( _listener == null ) { _listener = new BindingErrorTraceListener(); PresentationTraceSources.DataBindingSource.Listeners.Add( _listener ); } _listener.TraceOutputOptions = options; PresentationTraceSources.DataBindingSource.Switch.Level = level; } }
/// <summary> /// Initializes the trace listener only if there is a debugger attached. /// </summary> /// <param name="level">The level.</param> /// <param name="options">The options.</param> public static void Initialize(SourceLevels level, TraceOptions options) { if (Debugger.IsAttached) { if (_listener == null) { _listener = new BindingErrorTraceListener(); PresentationTraceSources.DataBindingSource.Listeners.Add(_listener); } _listener.TraceOutputOptions = options; PresentationTraceSources.DataBindingSource.Switch.Level = level; } }