コード例 #1
0
		public void TearDown()
		{
			configurationSource = null;
			MockTraceListener.Reset();
			MockBlockingCustomTraceListener.Reset();
			LogWriter.ResetLockTimeouts();
		}
コード例 #2
0
 public void TearDown()
 {
     configurationSource = null;
     MockTraceListener.Reset();
     MockBlockingCustomTraceListener.Reset();
     LogWriter.ResetLockTimeouts();
 }
コード例 #3
0
		public void SetUp()
		{
			configurationSource = new DictionaryConfigurationSourceWithHandlersQuery();

			InstrumentationConfigurationSection instrumentationConfig = new InstrumentationConfigurationSection(true, true, true);
			configurationSource.Add(InstrumentationConfigurationSection.SectionName, instrumentationConfig);

			settings = new LoggingSettings();
			configurationSource.Add(LoggingSettings.SectionName, settings);

			settings.SpecialTraceSources.ErrorsTraceSource
				= new TraceSourceData("error", SourceLevels.Off);

			TraceSourceData traceSourceData = new TraceSourceData("blocking", SourceLevels.All);
			traceSourceData.TraceListeners.Add(new TraceListenerReferenceData("listener1"));
			settings.TraceSources.Add(traceSourceData);
			traceSourceData = new TraceSourceData("nonblocking", SourceLevels.All);
			traceSourceData.TraceListeners.Add(new TraceListenerReferenceData("listener2"));
			settings.TraceSources.Add(traceSourceData);

			TraceListenerData traceListenerData = new CustomTraceListenerData("listener1", typeof(MockBlockingCustomTraceListener), "init 1");
			settings.TraceListeners.Add(traceListenerData);
			traceListenerData = new MockTraceListenerData("listener2");
			settings.TraceListeners.Add(traceListenerData);

			reflectionCache = new ConfigurationReflectionCache();

			MockTraceListener.Reset();
			MockBlockingCustomTraceListener.Reset();
		}
コード例 #4
0
        public void SetUp()
        {
            configurationSource = new DictionaryConfigurationSourceWithHandlersQuery();

            InstrumentationConfigurationSection instrumentationConfig = new InstrumentationConfigurationSection(true, true, false);

            configurationSource.Add(InstrumentationConfigurationSection.SectionName, instrumentationConfig);

            settings = new LoggingSettings();
            configurationSource.Add(LoggingSettings.SectionName, settings);

            settings.SpecialTraceSources.ErrorsTraceSource
                = new TraceSourceData("error", SourceLevels.Off);

            TraceSourceData traceSourceData = new TraceSourceData("blocking", SourceLevels.All);

            traceSourceData.TraceListeners.Add(new TraceListenerReferenceData("listener1"));
            settings.TraceSources.Add(traceSourceData);
            traceSourceData = new TraceSourceData("nonblocking", SourceLevels.All);
            traceSourceData.TraceListeners.Add(new TraceListenerReferenceData("listener2"));
            settings.TraceSources.Add(traceSourceData);

            TraceListenerData traceListenerData = new CustomTraceListenerData("listener1", typeof(MockBlockingCustomTraceListener), "init 1");

            settings.TraceListeners.Add(traceListenerData);
            traceListenerData = new MockTraceListenerData("listener2");
            settings.TraceListeners.Add(traceListenerData);

            reflectionCache = new ConfigurationReflectionCache();

            MockTraceListener.Reset();
            MockBlockingCustomTraceListener.Reset();
        }