protected FileProcessorBase(FileProcessorEndpoint endpoint, IFileHandler handler, IFilePostProcessor postProcessor, IFileFilter additionalFilter) { if (endpoint == null) { throw new ArgumentException("endpoint"); } if (handler == null) { throw new ArgumentException("handler"); } if (postProcessor == null) { throw new ArgumentNullException("postProcessor"); } if (additionalFilter == null) { throw new ArgumentNullException("additionalFilter"); } this.instanceId = Guid.Empty; this.Endpoint = endpoint; this.Handler = handler; this.PostProcessor = postProcessor; this.AdditionalFilter = additionalFilter; this.scavenger = new FileScavenger(endpoint, additionalFilter, this.InstanceId); this.scavenger.RestartFileChecking += (o, e) => this.RestartNewFileChecking(); this.pendingFiles = new ConcurrentQueue<string>(); this.eventHandle = new AutoResetEvent(false); this.quitHandle = new ManualResetEvent(false); this.quitting = false; Logger.DebugFormat("Scavenger interval set at {0:0.0} seconds", endpoint.ScavengeInterval.TotalSeconds); }
protected FileProcessorBase(FileProcessorEndpoint endpoint, IFileHandler handler, IFilePostProcessor postProcessor, IFileFilter additionalFilter) { if (endpoint == null) { throw new ArgumentException("endpoint"); } if (handler == null) { throw new ArgumentException("handler"); } if (postProcessor == null) { throw new ArgumentNullException("postProcessor"); } if (additionalFilter == null) { throw new ArgumentNullException("additionalFilter"); } this.instanceId = Guid.Empty; this.Endpoint = endpoint; this.Handler = handler; this.PostProcessor = postProcessor; this.AdditionalFilter = additionalFilter; this.scavenger = new FileScavenger(endpoint, additionalFilter, this.InstanceId); this.scavenger.RestartFileChecking += (o, e) => this.RestartNewFileChecking(); this.pendingFiles = new ConcurrentQueue <string>(); this.eventHandle = new AutoResetEvent(false); this.quitHandle = new ManualResetEvent(false); this.quitting = false; Logger.DebugFormat("Scavenger interval set at {0:0.0} seconds", endpoint.ScavengeInterval.TotalSeconds); }