public DocumentsController( Func <DocumentsController, SortedDictionary <int, IDocumentHandler> > handlersChainFactory, IDocumentErrorHandler exceptionsHandler, IWaitForFile fileReader) { if (handlersChainFactory == null) { throw new ArgumentNullException(nameof(handlersChainFactory)); } this.exceptionsHandler = exceptionsHandler ?? throw new ArgumentNullException(nameof(exceptionsHandler)); this.fileReader = fileReader ?? throw new ArgumentNullException(nameof(fileReader)); handlersChain = handlersChainFactory.Invoke(this); timeoutTimer = new Timer(CollectBatch, null, ThreadingTimeout.Infinite, ThreadingTimeout.Infinite); }
public PdfSharpDocumentsJoiner(CancellationToken token, IWaitForFile fileReader) { this.token = token; this.fileReader = fileReader; }