コード例 #1
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);
        }
コード例 #2
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);
        }
コード例 #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()