Exemple #1
0
        public FileProcessor(
            IFileNameGenerator fileNameGenerator,
            IDocumentWrapper documentWrapper,
            IDocumentManager documentManager,
            Func <Type, ITaggerCommand> commandFactory,
            ILogger logger)
        {
            if (fileNameGenerator == null)
            {
                throw new ArgumentNullException(nameof(fileNameGenerator));
            }

            if (documentWrapper == null)
            {
                throw new ArgumentNullException(nameof(documentWrapper));
            }

            if (documentManager == null)
            {
                throw new ArgumentNullException(nameof(documentManager));
            }

            if (commandFactory == null)
            {
                throw new ArgumentNullException(nameof(commandFactory));
            }

            this.fileNameGenerator = fileNameGenerator;
            this.documentWrapper   = documentWrapper;
            this.documentManager   = documentManager;
            this.commandFactory    = commandFactory;
            this.logger            = logger;

            this.tasks = new ConcurrentQueue <Task>();
        }
 public DocumentMerger(IDocumentReader documentReader, IDocumentWrapper documentWrapper)
 {
     this.documentReader  = documentReader ?? throw new ArgumentNullException(nameof(documentReader));
     this.documentWrapper = documentWrapper ?? throw new ArgumentNullException(nameof(documentWrapper));
 }