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);
        }
        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);
        }
示例#3
0
        public static 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));
            }

            return(null);
        } // !Load()