protected AbstractConsumer(IConsumerBuffer buffer) { Guard.ArgumentNotNull(buffer, buffer.GetType().FullName); Buffer = buffer; _cts = new CancellationTokenSource(); _threadPool = new ThreadPool(); _isTaskStart = new ThreadSafe.Boolean(false); ConfigUtil.Instance.NotifyPropertyChange += OnNotifyPropertyChange; #if DEBUG this.debugLog = ObjectFactory.Current.Get<IDebugLogWriter>(Lifetime.ContainerControlled); #endif }