Пример #1
0
        public void SetJobTraceListener(JobTraceListener jobTraceListener)
        {
            JobTraceListener = jobTraceListener;
            Trace.Listeners.Add(jobTraceListener);

            if (_jobTraceEventListener != null)
            {
                _jobTraceEventListener.Dispose();
            }

            if (_jobEventSource != null)
            {
                _jobTraceEventListener = new JobTraceEventListener(JobTraceListener);
                _jobTraceEventListener.EnableEvents(_jobEventSource, EventLevel.LogAlways);
            }
        }
Пример #2
0
        public void SetJobTraceListener(JobTraceListener jobTraceListener)
        {
            JobTraceListener = jobTraceListener;
            Trace.Listeners.Add(jobTraceListener);

            if (_jobTraceEventListener != null)
            {
                _jobTraceEventListener.Dispose();
            }

            if (_jobEventSource != null)
            {
                _jobTraceEventListener = new JobTraceEventListener(JobTraceListener);
                _jobTraceEventListener.EnableEvents(_jobEventSource, EventLevel.LogAlways);
            }
        }