/// <summary> /// Creates the txtExecutionTracerServiceConfiguration section handler. /// </summary> /// /// <param name="parent"> /// Parent object. /// </param> /// /// <param name="configContext"> /// Configuration context object. /// </param> /// /// <param name="section"> /// Section XML node. /// </param> /// /// <returns> /// The QueueExecutionTracerServiceSection handler object. /// </returns> public object Create(object parent, object configContext, XmlNode section) { QueueExecutionTracerServiceSection cfgSection = new QueueExecutionTracerServiceSection(); cfgSection.Load(section); return(cfgSection); }
static QueueExecutionTracerService() { _config = QueueExecutionTracerServiceSectionHandler.GetSection(); _queue = new ConcurrentQueue <T>(); if (_config == null) { _config = new QueueExecutionTracerServiceSection { IsEnabled = true, WithDebugTrace = true, MaxItems = 1024, RollTimer = 1 }; } _timer = new System.Timers.Timer(TimeSpan.FromSeconds(_config.RollTimer).TotalMilliseconds); _timer.Elapsed += OnTimerElapsed; _timer.Enabled = true; }