public TemplateExtractor(ILogger <TemplateExtractor> logger, InvoiceTemplate template, IPreparationStepsFactory preparation, IFieldProcessor processor)
 {
     this.template    = template ?? throw new ArgumentNullException(nameof(template));
     this.preparation = preparation ?? throw new ArgumentNullException(nameof(preparation));
     this.processor   = processor ?? throw new ArgumentNullException(nameof(processor));
     this.logger      = logger ?? throw new ArgumentNullException(nameof(logger));
     if (!template.Validate())
     {
         throw new ArgumentOutOfRangeException(nameof(template));
     }
 }
Example #2
0
 public TemplateExtractorFactory(ILoggerFactory factory, IPreparationStepsFactory preparation, IFieldProcessor processor)
 {
     this.preparation = preparation;
     this.processor   = processor;
     this.factory     = factory;
 }