public static void EnqueueRequest(HttpRequestData data) { if (_maxQueueSize != null && _requestsQueue.Count >= _maxQueueSize.Value) { if (!_seenMaxSize) { _logger.Warn(() => string.Format("Queue size reached max size ({0}), ignoring", _maxQueueSize.Value)); } _seenMaxSize = true; return; } _requestsQueue.Enqueue(data); }
static PageNameFilter() { _logger = new EventLogHelper(typeof(PageNameFilter)); var filters = new List <IFilterPagesToAnalyze> { }; var config = FiltersSection.Get(); foreach (var filter in config.Filters.Cast <FilterElement>()) { var filterType = Type.GetType(filter.NameOrType); if (filterType == null) { _logger.Warn(() => string.Format("Couldn't load type for filter: {0}", filter.NameOrType)); continue; } filters.Add((IFilterPagesToAnalyze)Activator.CreateInstance(filterType)); } _filters = filters.ToArray(); }