Ejemplo n.º 1
0
        public new static InvoiceDescriptor Load(string filename)
        {
            IInvoiceDescriptorReader reader = new InvoiceDescriptor1Reader();

            if (reader.IsReadableByThisReaderVersion(filename))
            {
                return(reader.Load(filename));
            }

            reader = new InvoiceDescriptor2Reader();
            if (reader.IsReadableByThisReaderVersion(filename))
            {
                return(reader.Load(filename));
            }

            reader = new InvoiceDescriptorXRechnungReader();
            if (reader.IsReadableByThisReaderVersion(filename))
            {
                return(reader.Load(filename));
            }

            reader = new InvoiceDescriptorFacturXReader();
            if (reader.IsReadableByThisReaderVersion(filename))
            {
                return(reader.Load(filename));
            }

            return(null);
        }
Ejemplo n.º 2
0
        public override InvoiceDescriptor Load(Stream stream)
        {
            IInvoiceDescriptorReader reader = new InvoiceDescriptor1Reader();

            if (reader.IsReadableByThisReaderVersion(stream))
            {
                return(reader.Load(stream));
            }

            reader = new InvoiceDescriptor2Reader();
            if (reader.IsReadableByThisReaderVersion(stream))
            {
                return(reader.Load(stream));
            }

            reader = new InvoiceDescriptorXRechnungReader();
            if (reader.IsReadableByThisReaderVersion(stream))
            {
                return(reader.Load(stream));
            }

            reader = new InvoiceDescriptorFacturXReader();
            if (reader.IsReadableByThisReaderVersion(stream))
            {
                return(reader.Load(stream));
            }

            return(null);
        }