Ejemplo n.º 1
0
        public Engine(IInvoiceParser invParser, IDecimalParser decParser, IDateParser dateParser, IReader reader, IDocWriter writer, string docTemplatePath, string saveNameTemplate, string company)
        {
            Guard.WhenArgument(invParser, "invParser").IsNull().Throw();
            Guard.WhenArgument(decParser, "decParser").IsNull().Throw();
            Guard.WhenArgument(dateParser, "dateParser").IsNull().Throw();
            Guard.WhenArgument(reader, "reader").IsNull().Throw();
            Guard.WhenArgument(writer, "writer").IsNull().Throw();
            Guard.WhenArgument(docTemplatePath, "docTemplatePath").IsNullOrWhiteSpace().Throw();
            Guard.WhenArgument(saveNameTemplate, "saveNameTemplate").IsNullOrWhiteSpace().Throw();
            Guard.WhenArgument(company, "company").IsNullOrWhiteSpace().Throw();

            this.invParser        = invParser;
            this.decParser        = decParser;
            this.reader           = reader;
            this.writer           = writer;
            this.DocTemplatePath  = docTemplatePath;
            this.saveNameTemplate = saveNameTemplate;
            this.dateParser       = dateParser;
            this.company          = company;
        }
Ejemplo n.º 2
0
 public InvoiceImporter(ApiExplorer idokladClient, IInvoiceParser invoiceParser)
 {
     _idokladClient = idokladClient;
     _invoiceParser = invoiceParser;
 }