'' ------------------------------------------------------------------------------ '' '' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com '' {"TargetFramework":"Net47","NameSpace":"DEXPDF","Language":"VisualBasic","ExcludeImportedTypes":true,"ExpandNestedAttributeGroup":true,"GenerateUnusedComplexType":true,"GenerateUnusedSimpleType":true,"Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} '' '' ------------------------------------------------------------------------------ #Disable Warning Imports System Imports System.Diagnostics Imports System.Xml.Serialization Imports System.Runtime.Serialization Imports System.Collections Imports System.Xml.Schema Imports System.ComponentModel Imports System.Xml Imports System.IO Imports System.Text Imports System.Collections.Generic Namespace DEXPDF Partial Public Class DEXPDF #Region "Private fields" Private _preparationDateAndTime As Date Private _messageIdentification As String Private _messageGroup As DEXPDFMessageGroup Private _messageType As DEXPDFMessageType Private _messageVersion As String Private _messageSender As DEXPDFMessageSender Private _messageRecipient As DEXPDFMessageRecipient Private _exportOperation As DEXPDFExportOperation Private _authorisation As List(Of DEXPDFAuthorisation) Private _customsOfficeOfPresentation As DEXPDFCustomsOfficeOfPresentation Private _customsOfficeOfExport As DEXPDFCustomsOfficeOfExport Private _customsOfficeOfSupplement As DEXPDFCustomsOfficeOfSupplement Private _customsOfficeOfExitDeclared As DEXPDFCustomsOfficeOfExitDeclared Private _customsOfficeOfExitActual As DEXPDFCustomsOfficeOfExitActual Private _contractualPartner As DEXPDFContractualPartner Private _exporter As DEXPDFExporter Private _declarant As DEXPDFDeclarant Private _representative As DEXPDFRepresentative Private _subContractor As DEXPDFSubContractor Private _goodsShipment As DEXPDFGoodsShipment Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._goodsShipment = New DEXPDFGoodsShipment() Me._subContractor = New DEXPDFSubContractor() Me._representative = New DEXPDFRepresentative() Me._declarant = New DEXPDFDeclarant() Me._exporter = New DEXPDFExporter() Me._contractualPartner = New DEXPDFContractualPartner() Me._customsOfficeOfExitActual = New DEXPDFCustomsOfficeOfExitActual() Me._customsOfficeOfExitDeclared = New DEXPDFCustomsOfficeOfExitDeclared() Me._customsOfficeOfSupplement = New DEXPDFCustomsOfficeOfSupplement() Me._customsOfficeOfExport = New DEXPDFCustomsOfficeOfExport() Me._customsOfficeOfPresentation = New DEXPDFCustomsOfficeOfPresentation() Me._authorisation = New List(Of DEXPDFAuthorisation)() Me._exportOperation = New DEXPDFExportOperation() Me._messageRecipient = New DEXPDFMessageRecipient() Me._messageSender = New DEXPDFMessageSender() End Sub Public Property preparationDateAndTime() As Date Get Return Me._preparationDateAndTime End Get Set Me._preparationDateAndTime = Value End Set End Property Public Property messageIdentification() As String Get Return Me._messageIdentification End Get Set Me._messageIdentification = Value End Set End Property Public Property messageGroup() As DEXPDFMessageGroup Get Return Me._messageGroup End Get Set Me._messageGroup = Value End Set End Property Public Property messageType() As DEXPDFMessageType Get Return Me._messageType End Get Set Me._messageType = Value End Set End Property Public Property messageVersion() As String Get Return Me._messageVersion End Get Set Me._messageVersion = Value End Set End Property Public Property MessageSender() As DEXPDFMessageSender Get Return Me._messageSender End Get Set Me._messageSender = Value End Set End Property Public Property MessageRecipient() As DEXPDFMessageRecipient Get Return Me._messageRecipient End Get Set Me._messageRecipient = Value End Set End Property Public Property ExportOperation() As DEXPDFExportOperation Get Return Me._exportOperation End Get Set Me._exportOperation = Value End Set End Property Public Property Authorisation() As List(Of DEXPDFAuthorisation) Get Return Me._authorisation End Get Set Me._authorisation = Value End Set End Property Public Property CustomsOfficeOfPresentation() As DEXPDFCustomsOfficeOfPresentation Get Return Me._customsOfficeOfPresentation End Get Set Me._customsOfficeOfPresentation = Value End Set End Property Public Property CustomsOfficeOfExport() As DEXPDFCustomsOfficeOfExport Get Return Me._customsOfficeOfExport End Get Set Me._customsOfficeOfExport = Value End Set End Property Public Property CustomsOfficeOfSupplement() As DEXPDFCustomsOfficeOfSupplement Get Return Me._customsOfficeOfSupplement End Get Set Me._customsOfficeOfSupplement = Value End Set End Property Public Property CustomsOfficeOfExitDeclared() As DEXPDFCustomsOfficeOfExitDeclared Get Return Me._customsOfficeOfExitDeclared End Get Set Me._customsOfficeOfExitDeclared = Value End Set End Property Public Property CustomsOfficeOfExitActual() As DEXPDFCustomsOfficeOfExitActual Get Return Me._customsOfficeOfExitActual End Get Set Me._customsOfficeOfExitActual = Value End Set End Property Public Property ContractualPartner() As DEXPDFContractualPartner Get Return Me._contractualPartner End Get Set Me._contractualPartner = Value End Set End Property Public Property Exporter() As DEXPDFExporter Get Return Me._exporter End Get Set Me._exporter = Value End Set End Property Public Property Declarant() As DEXPDFDeclarant Get Return Me._declarant End Get Set Me._declarant = Value End Set End Property Public Property Representative() As DEXPDFRepresentative Get Return Me._representative End Get Set Me._representative = Value End Set End Property Public Property SubContractor() As DEXPDFSubContractor Get Return Me._subContractor End Get Set Me._subContractor = Value End Set End Property Public Property GoodsShipment() As DEXPDFGoodsShipment Get Return Me._goodsShipment End Get Set Me._goodsShipment = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDF)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDF object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDF object ''' ''' string to deserialize ''' Output DEXPDF object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDF, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDF) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDF) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDF Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDF) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDF Return CType(SerializerXml.Deserialize(s), DEXPDF) End Function #End Region ''' ''' Serializes current DEXPDF object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDF object ''' ''' File to load and deserialize ''' Output DEXPDF object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDF, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDF) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDF) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDF Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFMessageGroup EXP End Enum Public Enum DEXPDFMessageType DEXPDF End Enum Partial Public Class DEXPDFMessageSender #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _authenticationNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property authenticationNumber() As String Get Return Me._authenticationNumber End Get Set Me._authenticationNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFMessageSender)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFMessageSender object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFMessageSender object ''' ''' string to deserialize ''' Output DEXPDFMessageSender object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageSender, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFMessageSender) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageSender) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFMessageSender Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFMessageSender) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFMessageSender Return CType(SerializerXml.Deserialize(s), DEXPDFMessageSender) End Function #End Region ''' ''' Serializes current DEXPDFMessageSender object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFMessageSender object ''' ''' File to load and deserialize ''' Output DEXPDFMessageSender object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageSender, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFMessageSender) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageSender) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFMessageSender Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFMessageRecipient #Region "Private fields" Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFMessageRecipient)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFMessageRecipient object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFMessageRecipient object ''' ''' string to deserialize ''' Output DEXPDFMessageRecipient object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageRecipient, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFMessageRecipient) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageRecipient) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFMessageRecipient Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFMessageRecipient) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFMessageRecipient Return CType(SerializerXml.Deserialize(s), DEXPDFMessageRecipient) End Function #End Region ''' ''' Serializes current DEXPDFMessageRecipient object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFMessageRecipient object ''' ''' File to load and deserialize ''' Output DEXPDFMessageRecipient object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageRecipient, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFMessageRecipient) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageRecipient) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFMessageRecipient Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFExportOperation #Region "Private fields" Private _lRN As String Private _declarationType As String Private _exportDeclarationType As DEXPDFExportOperationExportDeclarationType Private _partyConstellation As DEXPDFExportOperationPartyConstellation Private _declarationSubmissionDateAndTime As Date Private _decisiveDate As Date Private _exitDate As Date Private _presentationStartDateAndTime As Date Private _loadingEndDateAndTime As Date Private _security As String Private _specificCircumstanceIndicator As String Private _totalAmountInvoiced As Decimal Private _invoiceCurrency As String Private Shared _serializerXml As XmlSerializer #End Region Public Property LRN() As String Get Return Me._lRN End Get Set Me._lRN = Value End Set End Property Public Property declarationType() As String Get Return Me._declarationType End Get Set Me._declarationType = Value End Set End Property Public Property exportDeclarationType() As DEXPDFExportOperationExportDeclarationType Get Return Me._exportDeclarationType End Get Set Me._exportDeclarationType = Value End Set End Property Public Property partyConstellation() As DEXPDFExportOperationPartyConstellation Get Return Me._partyConstellation End Get Set Me._partyConstellation = Value End Set End Property Public Property declarationSubmissionDateAndTime() As Date Get Return Me._declarationSubmissionDateAndTime End Get Set Me._declarationSubmissionDateAndTime = Value End Set End Property Public Property decisiveDate() As Date Get Return Me._decisiveDate End Get Set Me._decisiveDate = Value End Set End Property Public Property exitDate() As Date Get Return Me._exitDate End Get Set Me._exitDate = Value End Set End Property Public Property presentationStartDateAndTime() As Date Get Return Me._presentationStartDateAndTime End Get Set Me._presentationStartDateAndTime = Value End Set End Property Public Property loadingEndDateAndTime() As Date Get Return Me._loadingEndDateAndTime End Get Set Me._loadingEndDateAndTime = Value End Set End Property Public Property security() As String Get Return Me._security End Get Set Me._security = Value End Set End Property Public Property specificCircumstanceIndicator() As String Get Return Me._specificCircumstanceIndicator End Get Set Me._specificCircumstanceIndicator = Value End Set End Property Public Property totalAmountInvoiced() As Decimal Get Return Me._totalAmountInvoiced End Get Set Me._totalAmountInvoiced = Value End Set End Property Public Property invoiceCurrency() As String Get Return Me._invoiceCurrency End Get Set Me._invoiceCurrency = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFExportOperation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFExportOperation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFExportOperation object ''' ''' string to deserialize ''' Output DEXPDFExportOperation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExportOperation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFExportOperation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExportOperation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFExportOperation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFExportOperation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFExportOperation Return CType(SerializerXml.Deserialize(s), DEXPDFExportOperation) End Function #End Region ''' ''' Serializes current DEXPDFExportOperation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFExportOperation object ''' ''' File to load and deserialize ''' Output DEXPDFExportOperation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExportOperation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFExportOperation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExportOperation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFExportOperation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFExportOperationExportDeclarationType Item00000100 Item00000110 Item00000200 Item00000210 Item00000400 Item00000901 Item00000902 Item00001300 Item00001310 Item00001410 Item00110100 Item00110110 Item00110200 Item00110210 Item00110400 Item00111300 Item00111310 Item00111410 Item00120100 Item00120110 Item00120200 Item00120210 Item00200100 Item00200110 Item00200200 Item00200210 Item00200400 Item00201300 Item00201310 Item00201410 Item10000000 Item10000400 Item10110000 Item10110400 Item10200000 Item10200400 Item11000000 Item11110000 Item11120000 Item11200000 Item12000000 Item12110000 Item12120000 Item12200000 Item13000000 Item20000000 End Enum Public Enum DEXPDFExportOperationPartyConstellation Item0000 Item0001 Item0010 Item0011 Item0100 Item0101 Item0110 Item0111 Item1000 Item1010 Item1100 Item1110 End Enum Partial Public Class DEXPDFAuthorisation #Region "Private fields" Private _sequenceNumber As String Private _type As DEXPDFAuthorisationType Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As DEXPDFAuthorisationType Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFAuthorisation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFAuthorisation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFAuthorisation object ''' ''' string to deserialize ''' Output DEXPDFAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFAuthorisation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFAuthorisation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFAuthorisation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFAuthorisation Return CType(SerializerXml.Deserialize(s), DEXPDFAuthorisation) End Function #End Region ''' ''' Serializes current DEXPDFAuthorisation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFAuthorisation object ''' ''' File to load and deserialize ''' Output DEXPDFAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFAuthorisation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFAuthorisation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFAuthorisationType C019 C512 C513 C514 C517 C518 C519 End Enum Partial Public Class DEXPDFCustomsOfficeOfPresentation #Region "Private fields" Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFCustomsOfficeOfPresentation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFCustomsOfficeOfPresentation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFCustomsOfficeOfPresentation object ''' ''' string to deserialize ''' Output DEXPDFCustomsOfficeOfPresentation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfPresentation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfPresentation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfPresentation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfPresentation Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfPresentation) End Function #End Region ''' ''' Serializes current DEXPDFCustomsOfficeOfPresentation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfPresentation object ''' ''' File to load and deserialize ''' Output DEXPDFCustomsOfficeOfPresentation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfPresentation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfPresentation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFCustomsOfficeOfExport #Region "Private fields" Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFCustomsOfficeOfExport)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFCustomsOfficeOfExport object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFCustomsOfficeOfExport object ''' ''' string to deserialize ''' Output DEXPDFCustomsOfficeOfExport object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExport, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfExport) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExport) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfExport Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfExport) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfExport Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfExport) End Function #End Region ''' ''' Serializes current DEXPDFCustomsOfficeOfExport object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExport object ''' ''' File to load and deserialize ''' Output DEXPDFCustomsOfficeOfExport object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExport, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfExport) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExport) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfExport Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFCustomsOfficeOfSupplement #Region "Private fields" Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFCustomsOfficeOfSupplement)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFCustomsOfficeOfSupplement object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFCustomsOfficeOfSupplement object ''' ''' string to deserialize ''' Output DEXPDFCustomsOfficeOfSupplement object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfSupplement) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfSupplement Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfSupplement) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfSupplement Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfSupplement) End Function #End Region ''' ''' Serializes current DEXPDFCustomsOfficeOfSupplement object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfSupplement object ''' ''' File to load and deserialize ''' Output DEXPDFCustomsOfficeOfSupplement object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfSupplement) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfSupplement Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFCustomsOfficeOfExitDeclared #Region "Private fields" Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFCustomsOfficeOfExitDeclared)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFCustomsOfficeOfExitDeclared object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFCustomsOfficeOfExitDeclared object ''' ''' string to deserialize ''' Output DEXPDFCustomsOfficeOfExitDeclared object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfExitDeclared) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfExitDeclared Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfExitDeclared) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfExitDeclared Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfExitDeclared) End Function #End Region ''' ''' Serializes current DEXPDFCustomsOfficeOfExitDeclared object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExitDeclared object ''' ''' File to load and deserialize ''' Output DEXPDFCustomsOfficeOfExitDeclared object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfExitDeclared) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfExitDeclared Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFCustomsOfficeOfExitActual #Region "Private fields" Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFCustomsOfficeOfExitActual)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFCustomsOfficeOfExitActual object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFCustomsOfficeOfExitActual object ''' ''' string to deserialize ''' Output DEXPDFCustomsOfficeOfExitActual object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfExitActual) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfExitActual Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfExitActual) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfExitActual Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfExitActual) End Function #End Region ''' ''' Serializes current DEXPDFCustomsOfficeOfExitActual object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExitActual object ''' ''' File to load and deserialize ''' Output DEXPDFCustomsOfficeOfExitActual object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFCustomsOfficeOfExitActual) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfExitActual Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFContractualPartner #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFContractualPartnerAddress Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._address = New DEXPDFContractualPartnerAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFContractualPartnerAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFContractualPartner)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFContractualPartner object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFContractualPartner object ''' ''' string to deserialize ''' Output DEXPDFContractualPartner object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartner, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFContractualPartner) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartner) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFContractualPartner Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFContractualPartner) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFContractualPartner Return CType(SerializerXml.Deserialize(s), DEXPDFContractualPartner) End Function #End Region ''' ''' Serializes current DEXPDFContractualPartner object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFContractualPartner object ''' ''' File to load and deserialize ''' Output DEXPDFContractualPartner object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartner, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFContractualPartner) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartner) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFContractualPartner Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFContractualPartnerAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFContractualPartnerAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFContractualPartnerAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFContractualPartnerAddress object ''' ''' string to deserialize ''' Output DEXPDFContractualPartnerAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartnerAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFContractualPartnerAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartnerAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFContractualPartnerAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFContractualPartnerAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFContractualPartnerAddress Return CType(SerializerXml.Deserialize(s), DEXPDFContractualPartnerAddress) End Function #End Region ''' ''' Serializes current DEXPDFContractualPartnerAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFContractualPartnerAddress object ''' ''' File to load and deserialize ''' Output DEXPDFContractualPartnerAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartnerAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFContractualPartnerAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartnerAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFContractualPartnerAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFExporter #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFExporterAddress Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._address = New DEXPDFExporterAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFExporterAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFExporter)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFExporter object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFExporter object ''' ''' string to deserialize ''' Output DEXPDFExporter object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporter, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFExporter) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporter) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFExporter Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFExporter) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFExporter Return CType(SerializerXml.Deserialize(s), DEXPDFExporter) End Function #End Region ''' ''' Serializes current DEXPDFExporter object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFExporter object ''' ''' File to load and deserialize ''' Output DEXPDFExporter object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporter, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFExporter) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporter) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFExporter Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFExporterAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFExporterAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFExporterAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFExporterAddress object ''' ''' string to deserialize ''' Output DEXPDFExporterAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporterAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFExporterAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporterAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFExporterAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFExporterAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFExporterAddress Return CType(SerializerXml.Deserialize(s), DEXPDFExporterAddress) End Function #End Region ''' ''' Serializes current DEXPDFExporterAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFExporterAddress object ''' ''' File to load and deserialize ''' Output DEXPDFExporterAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporterAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFExporterAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporterAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFExporterAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFDeclarant #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFDeclarantAddress Private _contactPerson As DEXPDFDeclarantContactPerson Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._contactPerson = New DEXPDFDeclarantContactPerson() Me._address = New DEXPDFDeclarantAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFDeclarantAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Public Property ContactPerson() As DEXPDFDeclarantContactPerson Get Return Me._contactPerson End Get Set Me._contactPerson = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFDeclarant)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFDeclarant object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFDeclarant object ''' ''' string to deserialize ''' Output DEXPDFDeclarant object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarant, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFDeclarant) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarant) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFDeclarant Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFDeclarant) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFDeclarant Return CType(SerializerXml.Deserialize(s), DEXPDFDeclarant) End Function #End Region ''' ''' Serializes current DEXPDFDeclarant object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFDeclarant object ''' ''' File to load and deserialize ''' Output DEXPDFDeclarant object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarant, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFDeclarant) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarant) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFDeclarant Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFDeclarantAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFDeclarantAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFDeclarantAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFDeclarantAddress object ''' ''' string to deserialize ''' Output DEXPDFDeclarantAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFDeclarantAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFDeclarantAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFDeclarantAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFDeclarantAddress Return CType(SerializerXml.Deserialize(s), DEXPDFDeclarantAddress) End Function #End Region ''' ''' Serializes current DEXPDFDeclarantAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFDeclarantAddress object ''' ''' File to load and deserialize ''' Output DEXPDFDeclarantAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFDeclarantAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFDeclarantAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFDeclarantContactPerson #Region "Private fields" Private _name As String Private _phoneNumber As String Private _eMailAddress As String Private Shared _serializerXml As XmlSerializer #End Region Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property phoneNumber() As String Get Return Me._phoneNumber End Get Set Me._phoneNumber = Value End Set End Property Public Property eMailAddress() As String Get Return Me._eMailAddress End Get Set Me._eMailAddress = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFDeclarantContactPerson)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFDeclarantContactPerson object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFDeclarantContactPerson object ''' ''' string to deserialize ''' Output DEXPDFDeclarantContactPerson object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantContactPerson, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFDeclarantContactPerson) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantContactPerson) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFDeclarantContactPerson Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFDeclarantContactPerson) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFDeclarantContactPerson Return CType(SerializerXml.Deserialize(s), DEXPDFDeclarantContactPerson) End Function #End Region ''' ''' Serializes current DEXPDFDeclarantContactPerson object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFDeclarantContactPerson object ''' ''' File to load and deserialize ''' Output DEXPDFDeclarantContactPerson object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantContactPerson, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFDeclarantContactPerson) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantContactPerson) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFDeclarantContactPerson Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFRepresentative #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _contactPerson As DEXPDFRepresentativeContactPerson Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._contactPerson = New DEXPDFRepresentativeContactPerson() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property ContactPerson() As DEXPDFRepresentativeContactPerson Get Return Me._contactPerson End Get Set Me._contactPerson = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFRepresentative)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFRepresentative object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFRepresentative object ''' ''' string to deserialize ''' Output DEXPDFRepresentative object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentative, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFRepresentative) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentative) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFRepresentative Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFRepresentative) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFRepresentative Return CType(SerializerXml.Deserialize(s), DEXPDFRepresentative) End Function #End Region ''' ''' Serializes current DEXPDFRepresentative object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFRepresentative object ''' ''' File to load and deserialize ''' Output DEXPDFRepresentative object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentative, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFRepresentative) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentative) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFRepresentative Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFRepresentativeContactPerson #Region "Private fields" Private _name As String Private _phoneNumber As String Private _eMailAddress As String Private Shared _serializerXml As XmlSerializer #End Region Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property phoneNumber() As String Get Return Me._phoneNumber End Get Set Me._phoneNumber = Value End Set End Property Public Property eMailAddress() As String Get Return Me._eMailAddress End Get Set Me._eMailAddress = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFRepresentativeContactPerson)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFRepresentativeContactPerson object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFRepresentativeContactPerson object ''' ''' string to deserialize ''' Output DEXPDFRepresentativeContactPerson object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFRepresentativeContactPerson) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentativeContactPerson) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFRepresentativeContactPerson Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFRepresentativeContactPerson) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFRepresentativeContactPerson Return CType(SerializerXml.Deserialize(s), DEXPDFRepresentativeContactPerson) End Function #End Region ''' ''' Serializes current DEXPDFRepresentativeContactPerson object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFRepresentativeContactPerson object ''' ''' File to load and deserialize ''' Output DEXPDFRepresentativeContactPerson object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFRepresentativeContactPerson) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentativeContactPerson) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFRepresentativeContactPerson Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFSubContractor #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFSubContractorAddress Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._address = New DEXPDFSubContractorAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFSubContractorAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFSubContractor)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFSubContractor object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFSubContractor object ''' ''' string to deserialize ''' Output DEXPDFSubContractor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFSubContractor) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractor) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFSubContractor Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFSubContractor) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFSubContractor Return CType(SerializerXml.Deserialize(s), DEXPDFSubContractor) End Function #End Region ''' ''' Serializes current DEXPDFSubContractor object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFSubContractor object ''' ''' File to load and deserialize ''' Output DEXPDFSubContractor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFSubContractor) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractor) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFSubContractor Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFSubContractorAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFSubContractorAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFSubContractorAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFSubContractorAddress object ''' ''' string to deserialize ''' Output DEXPDFSubContractorAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractorAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFSubContractorAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractorAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFSubContractorAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFSubContractorAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFSubContractorAddress Return CType(SerializerXml.Deserialize(s), DEXPDFSubContractorAddress) End Function #End Region ''' ''' Serializes current DEXPDFSubContractorAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFSubContractorAddress object ''' ''' File to load and deserialize ''' Output DEXPDFSubContractorAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractorAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFSubContractorAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractorAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFSubContractorAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipment #Region "Private fields" Private _natureOfTransaction As String Private _countryOfExport As String Private _countryOfDestination As String Private _additionalSupplyChainActor As List(Of DEXPDFGoodsShipmentAdditionalSupplyChainActor) Private _deliveryTerms As DEXPDFGoodsShipmentDeliveryTerms Private _outwardProcessing As DEXPDFGoodsShipmentOutwardProcessing Private _previousDocument As List(Of DEXPDFGoodsShipmentPreviousDocument) Private _supportingDocument As List(Of DEXPDFGoodsShipmentSupportingDocument) Private _additionalReference As List(Of DEXPDFGoodsShipmentAdditionalReference) Private _additionalInformation As List(Of DEXPDFGoodsShipmentAdditionalInformation) Private _consignment As DEXPDFGoodsShipmentConsignment Private _goodsItem As List(Of DEXPDFGoodsShipmentGoodsItem) Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._goodsItem = New List(Of DEXPDFGoodsShipmentGoodsItem)() Me._consignment = New DEXPDFGoodsShipmentConsignment() Me._additionalInformation = New List(Of DEXPDFGoodsShipmentAdditionalInformation)() Me._additionalReference = New List(Of DEXPDFGoodsShipmentAdditionalReference)() Me._supportingDocument = New List(Of DEXPDFGoodsShipmentSupportingDocument)() Me._previousDocument = New List(Of DEXPDFGoodsShipmentPreviousDocument)() Me._outwardProcessing = New DEXPDFGoodsShipmentOutwardProcessing() Me._deliveryTerms = New DEXPDFGoodsShipmentDeliveryTerms() Me._additionalSupplyChainActor = New List(Of DEXPDFGoodsShipmentAdditionalSupplyChainActor)() End Sub Public Property natureOfTransaction() As String Get Return Me._natureOfTransaction End Get Set Me._natureOfTransaction = Value End Set End Property Public Property countryOfExport() As String Get Return Me._countryOfExport End Get Set Me._countryOfExport = Value End Set End Property Public Property countryOfDestination() As String Get Return Me._countryOfDestination End Get Set Me._countryOfDestination = Value End Set End Property Public Property AdditionalSupplyChainActor() As List(Of DEXPDFGoodsShipmentAdditionalSupplyChainActor) Get Return Me._additionalSupplyChainActor End Get Set Me._additionalSupplyChainActor = Value End Set End Property Public Property DeliveryTerms() As DEXPDFGoodsShipmentDeliveryTerms Get Return Me._deliveryTerms End Get Set Me._deliveryTerms = Value End Set End Property Public Property OutwardProcessing() As DEXPDFGoodsShipmentOutwardProcessing Get Return Me._outwardProcessing End Get Set Me._outwardProcessing = Value End Set End Property Public Property PreviousDocument() As List(Of DEXPDFGoodsShipmentPreviousDocument) Get Return Me._previousDocument End Get Set Me._previousDocument = Value End Set End Property Public Property SupportingDocument() As List(Of DEXPDFGoodsShipmentSupportingDocument) Get Return Me._supportingDocument End Get Set Me._supportingDocument = Value End Set End Property Public Property AdditionalReference() As List(Of DEXPDFGoodsShipmentAdditionalReference) Get Return Me._additionalReference End Get Set Me._additionalReference = Value End Set End Property Public Property AdditionalInformation() As List(Of DEXPDFGoodsShipmentAdditionalInformation) Get Return Me._additionalInformation End Get Set Me._additionalInformation = Value End Set End Property Public Property Consignment() As DEXPDFGoodsShipmentConsignment Get Return Me._consignment End Get Set Me._consignment = Value End Set End Property Public Property GoodsItem() As List(Of DEXPDFGoodsShipmentGoodsItem) Get Return Me._goodsItem End Get Set Me._goodsItem = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipment)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipment object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipment object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipment) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipment) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipment Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipment) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipment Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipment) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipment object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipment object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipment) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipment) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipment Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentAdditionalSupplyChainActor #Region "Private fields" Private _sequenceNumber As String Private _role As String Private _identificationNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property role() As String Get Return Me._role End Get Set Me._role = Value End Set End Property Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentAdditionalSupplyChainActor)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentAdditionalSupplyChainActor object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentAdditionalSupplyChainActor object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentAdditionalSupplyChainActor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalSupplyChainActor) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentAdditionalSupplyChainActor Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentAdditionalSupplyChainActor) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentAdditionalSupplyChainActor Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentAdditionalSupplyChainActor) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentAdditionalSupplyChainActor object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalSupplyChainActor object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentAdditionalSupplyChainActor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalSupplyChainActor) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentAdditionalSupplyChainActor Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentDeliveryTerms #Region "Private fields" Private _incotermCode As String Private _uNLocode As String Private _location As String Private _country As String Private _text As String Private Shared _serializerXml As XmlSerializer #End Region Public Property incotermCode() As String Get Return Me._incotermCode End Get Set Me._incotermCode = Value End Set End Property Public Property UNLocode() As String Get Return Me._uNLocode End Get Set Me._uNLocode = Value End Set End Property Public Property location() As String Get Return Me._location End Get Set Me._location = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Public Property text() As String Get Return Me._text End Get Set Me._text = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentDeliveryTerms)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentDeliveryTerms object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentDeliveryTerms object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentDeliveryTerms object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentDeliveryTerms) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentDeliveryTerms Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentDeliveryTerms) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentDeliveryTerms Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentDeliveryTerms) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentDeliveryTerms object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentDeliveryTerms object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentDeliveryTerms object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentDeliveryTerms) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentDeliveryTerms Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentOutwardProcessing #Region "Private fields" Private _reimport As List(Of DEXPDFGoodsShipmentOutwardProcessingReimport) Private _identificationMeans As List(Of DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) Private _product As List(Of DEXPDFGoodsShipmentOutwardProcessingProduct) Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._product = New List(Of DEXPDFGoodsShipmentOutwardProcessingProduct)() Me._identificationMeans = New List(Of DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans)() Me._reimport = New List(Of DEXPDFGoodsShipmentOutwardProcessingReimport)() End Sub Public Property Reimport() As List(Of DEXPDFGoodsShipmentOutwardProcessingReimport) Get Return Me._reimport End Get Set Me._reimport = Value End Set End Property Public Property IdentificationMeans() As List(Of DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) Get Return Me._identificationMeans End Get Set Me._identificationMeans = Value End Set End Property Public Property Product() As List(Of DEXPDFGoodsShipmentOutwardProcessingProduct) Get Return Me._product End Get Set Me._product = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessing)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentOutwardProcessing object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentOutwardProcessing object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessing) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessing Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessing) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessing Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessing) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentOutwardProcessing object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessing object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessing) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessing Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentOutwardProcessingReimport #Region "Private fields" Private _sequenceNumber As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessingReimport)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentOutwardProcessingReimport object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingReimport object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingReimport object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingReimport) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingReimport Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingReimport) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingReimport Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingReimport) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingReimport object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingReimport object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingReimport object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingReimport) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingReimport Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans #Region "Private fields" Private _sequenceNumber As String Private _type As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeansType Private _description As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeansType Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property description() As String Get Return Me._description End Get Set Me._description = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentOutwardProcessingIdentificationMeansType A B N O P S T Z End Enum Partial Public Class DEXPDFGoodsShipmentOutwardProcessingProduct #Region "Private fields" Private _sequenceNumber As String Private _commodity As DEXPDFGoodsShipmentOutwardProcessingProductCommodity Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._commodity = New DEXPDFGoodsShipmentOutwardProcessingProductCommodity() End Sub Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property Commodity() As DEXPDFGoodsShipmentOutwardProcessingProductCommodity Get Return Me._commodity End Get Set Me._commodity = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessingProduct)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentOutwardProcessingProduct object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProduct object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingProduct object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProduct) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingProduct Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingProduct) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingProduct Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingProduct) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProduct object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProduct object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingProduct object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProduct) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingProduct Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentOutwardProcessingProductCommodity #Region "Private fields" Private _descriptionOfGoods As String Private _commodityCode As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._commodityCode = New DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode() End Sub Public Property descriptionOfGoods() As String Get Return Me._descriptionOfGoods End Get Set Me._descriptionOfGoods = Value End Set End Property Public Property CommodityCode() As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode Get Return Me._commodityCode End Get Set Me._commodityCode = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessingProductCommodity)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentOutwardProcessingProductCommodity object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProductCommodity object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodity) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodity Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingProductCommodity) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingProductCommodity Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingProductCommodity) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProductCommodity object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProductCommodity object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodity) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodity Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode #Region "Private fields" Private _harmonizedSystemSubHeadingCode As String Private _combinedNomenclatureCode As String Private Shared _serializerXml As XmlSerializer #End Region Public Property harmonizedSystemSubHeadingCode() As String Get Return Me._harmonizedSystemSubHeadingCode End Get Set Me._harmonizedSystemSubHeadingCode = Value End Set End Property Public Property combinedNomenclatureCode() As String Get Return Me._combinedNomenclatureCode End Get Set Me._combinedNomenclatureCode = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentPreviousDocument #Region "Private fields" Private _sequenceNumber As String Private _type As String Private _qualifier As String Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As String Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentPreviousDocument)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentPreviousDocument object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentPreviousDocument object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentPreviousDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentPreviousDocument) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentPreviousDocument Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentPreviousDocument) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentPreviousDocument Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentPreviousDocument) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentPreviousDocument object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentPreviousDocument object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentPreviousDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentPreviousDocument) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentPreviousDocument Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentSupportingDocument #Region "Private fields" Private _sequenceNumber As String Private _type As String Private _qualifier As String Private _referenceNumber As String Private _documentLineItemNumber As String Private _issuingAuthorityName As String Private _issuingDate As Date Private _validityDate As Date Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As String Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Public Property documentLineItemNumber() As String Get Return Me._documentLineItemNumber End Get Set Me._documentLineItemNumber = Value End Set End Property Public Property issuingAuthorityName() As String Get Return Me._issuingAuthorityName End Get Set Me._issuingAuthorityName = Value End Set End Property Public Property issuingDate() As Date Get Return Me._issuingDate End Get Set Me._issuingDate = Value End Set End Property Public Property validityDate() As Date Get Return Me._validityDate End Get Set Me._validityDate = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentSupportingDocument)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentSupportingDocument object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentSupportingDocument object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentSupportingDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentSupportingDocument) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentSupportingDocument Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentSupportingDocument) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentSupportingDocument Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentSupportingDocument) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentSupportingDocument object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentSupportingDocument object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentSupportingDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentSupportingDocument) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentSupportingDocument Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentAdditionalReference #Region "Private fields" Private _sequenceNumber As String Private _type As String Private _qualifier As String Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As String Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentAdditionalReference)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentAdditionalReference object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentAdditionalReference object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentAdditionalReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalReference) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentAdditionalReference Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentAdditionalReference) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentAdditionalReference Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentAdditionalReference) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentAdditionalReference object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalReference object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentAdditionalReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalReference) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentAdditionalReference Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentAdditionalInformation #Region "Private fields" Private _sequenceNumber As String Private _code As String Private _text As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property code() As String Get Return Me._code End Get Set Me._code = Value End Set End Property Public Property text() As String Get Return Me._text End Get Set Me._text = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentAdditionalInformation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentAdditionalInformation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentAdditionalInformation object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentAdditionalInformation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalInformation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentAdditionalInformation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentAdditionalInformation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentAdditionalInformation Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentAdditionalInformation) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentAdditionalInformation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalInformation object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentAdditionalInformation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalInformation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentAdditionalInformation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignment #Region "Private fields" Private _containerIndicator As DEXPDFGoodsShipmentConsignmentContainerIndicator Private _inlandModeOfTransport As String Private _modeOfTransportAtTheBorder As String Private _grossMass As Decimal Private _referenceNumberUCR As String Private _registrationNumberExternal As String Private _carrier As DEXPDFGoodsShipmentConsignmentCarrier Private _consignor As DEXPDFGoodsShipmentConsignmentConsignor Private _consignee As DEXPDFGoodsShipmentConsignmentConsignee Private _transportEquipment As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipment) Private _locationOfGoods As DEXPDFGoodsShipmentConsignmentLocationOfGoods Private _departureTransportMeans As List(Of DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) Private _countryOfRoutingOfConsignment As List(Of DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) Private _activeBorderTransportMeans As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans Private _transportDocument As List(Of DEXPDFGoodsShipmentConsignmentTransportDocument) Private _transportCharges As DEXPDFGoodsShipmentConsignmentTransportCharges Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._transportCharges = New DEXPDFGoodsShipmentConsignmentTransportCharges() Me._transportDocument = New List(Of DEXPDFGoodsShipmentConsignmentTransportDocument)() Me._activeBorderTransportMeans = New DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans() Me._countryOfRoutingOfConsignment = New List(Of DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment)() Me._departureTransportMeans = New List(Of DEXPDFGoodsShipmentConsignmentDepartureTransportMeans)() Me._locationOfGoods = New DEXPDFGoodsShipmentConsignmentLocationOfGoods() Me._transportEquipment = New List(Of DEXPDFGoodsShipmentConsignmentTransportEquipment)() Me._consignee = New DEXPDFGoodsShipmentConsignmentConsignee() Me._consignor = New DEXPDFGoodsShipmentConsignmentConsignor() Me._carrier = New DEXPDFGoodsShipmentConsignmentCarrier() End Sub Public Property containerIndicator() As DEXPDFGoodsShipmentConsignmentContainerIndicator Get Return Me._containerIndicator End Get Set Me._containerIndicator = Value End Set End Property Public Property inlandModeOfTransport() As String Get Return Me._inlandModeOfTransport End Get Set Me._inlandModeOfTransport = Value End Set End Property Public Property modeOfTransportAtTheBorder() As String Get Return Me._modeOfTransportAtTheBorder End Get Set Me._modeOfTransportAtTheBorder = Value End Set End Property Public Property grossMass() As Decimal Get Return Me._grossMass End Get Set Me._grossMass = Value End Set End Property Public Property referenceNumberUCR() As String Get Return Me._referenceNumberUCR End Get Set Me._referenceNumberUCR = Value End Set End Property Public Property registrationNumberExternal() As String Get Return Me._registrationNumberExternal End Get Set Me._registrationNumberExternal = Value End Set End Property Public Property Carrier() As DEXPDFGoodsShipmentConsignmentCarrier Get Return Me._carrier End Get Set Me._carrier = Value End Set End Property Public Property Consignor() As DEXPDFGoodsShipmentConsignmentConsignor Get Return Me._consignor End Get Set Me._consignor = Value End Set End Property Public Property Consignee() As DEXPDFGoodsShipmentConsignmentConsignee Get Return Me._consignee End Get Set Me._consignee = Value End Set End Property Public Property TransportEquipment() As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipment) Get Return Me._transportEquipment End Get Set Me._transportEquipment = Value End Set End Property Public Property LocationOfGoods() As DEXPDFGoodsShipmentConsignmentLocationOfGoods Get Return Me._locationOfGoods End Get Set Me._locationOfGoods = Value End Set End Property Public Property DepartureTransportMeans() As List(Of DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) Get Return Me._departureTransportMeans End Get Set Me._departureTransportMeans = Value End Set End Property Public Property CountryOfRoutingOfConsignment() As List(Of DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) Get Return Me._countryOfRoutingOfConsignment End Get Set Me._countryOfRoutingOfConsignment = Value End Set End Property Public Property ActiveBorderTransportMeans() As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans Get Return Me._activeBorderTransportMeans End Get Set Me._activeBorderTransportMeans = Value End Set End Property Public Property TransportDocument() As List(Of DEXPDFGoodsShipmentConsignmentTransportDocument) Get Return Me._transportDocument End Get Set Me._transportDocument = Value End Set End Property Public Property TransportCharges() As DEXPDFGoodsShipmentConsignmentTransportCharges Get Return Me._transportCharges End Get Set Me._transportCharges = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignment)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignment object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignment object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignment) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignment) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignment Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignment) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignment Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignment) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignment object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignment object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignment) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignment) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignment Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentConsignmentContainerIndicator Item0 Item1 End Enum Partial Public Class DEXPDFGoodsShipmentConsignmentCarrier #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentCarrier)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentCarrier object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentCarrier object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentCarrier object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCarrier) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentCarrier Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentCarrier) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentCarrier Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentCarrier) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentCarrier object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentCarrier object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentCarrier object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCarrier) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentCarrier Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentConsignor #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFGoodsShipmentConsignmentConsignorAddress Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._address = New DEXPDFGoodsShipmentConsignmentConsignorAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFGoodsShipmentConsignmentConsignorAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentConsignor)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentConsignor object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentConsignor object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsignor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignor) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsignor Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsignor) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsignor Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsignor) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentConsignor object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignor object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsignor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignor) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsignor Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentConsignorAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentConsignorAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentConsignorAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentConsignorAddress object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsignorAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignorAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsignorAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsignorAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsignorAddress Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsignorAddress) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentConsignorAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignorAddress object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsignorAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignorAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsignorAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentConsignee #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFGoodsShipmentConsignmentConsigneeAddress Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._address = New DEXPDFGoodsShipmentConsignmentConsigneeAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFGoodsShipmentConsignmentConsigneeAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentConsignee)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentConsignee object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentConsignee object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsignee object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignee) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsignee Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsignee) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsignee Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsignee) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentConsignee object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignee object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsignee object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignee) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsignee Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentConsigneeAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentConsigneeAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentConsigneeAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentConsigneeAddress object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsigneeAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsigneeAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsigneeAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsigneeAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsigneeAddress Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsigneeAddress) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentConsigneeAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsigneeAddress object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentConsigneeAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsigneeAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsigneeAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipment #Region "Private fields" Private _sequenceNumber As String Private _containerIdentificationNumber As String Private _numberOfSeals As DEXPDFGoodsShipmentConsignmentTransportEquipmentNumberOfSeals Private _seal As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) Private _goodsReference As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._goodsReference = New List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference)() Me._seal = New List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal)() End Sub Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property containerIdentificationNumber() As String Get Return Me._containerIdentificationNumber End Get Set Me._containerIdentificationNumber = Value End Set End Property Public Property numberOfSeals() As DEXPDFGoodsShipmentConsignmentTransportEquipmentNumberOfSeals Get Return Me._numberOfSeals End Get Set Me._numberOfSeals = Value End Set End Property Public Property Seal() As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) Get Return Me._seal End Get Set Me._seal = Value End Set End Property Public Property GoodsReference() As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) Get Return Me._goodsReference End Get Set Me._goodsReference = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentTransportEquipment)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipment object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipment object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipment) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportEquipment Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportEquipment) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportEquipment Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportEquipment) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipment object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipment object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipment) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportEquipment Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentConsignmentTransportEquipmentNumberOfSeals Item0 End Enum Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal #Region "Private fields" Private _sequenceNumber As String Private _identifier As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property identifier() As String Get Return Me._identifier End Get Set Me._identifier = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference #Region "Private fields" Private _sequenceNumber As String Private _declarationGoodsItemNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property declarationGoodsItemNumber() As String Get Return Me._declarationGoodsItemNumber End Get Set Me._declarationGoodsItemNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoods #Region "Private fields" Private _typeOfLocation As DEXPDFGoodsShipmentConsignmentLocationOfGoodsTypeOfLocation Private _qualifierOfIdentification As DEXPDFGoodsShipmentConsignmentLocationOfGoodsQualifierOfIdentification Private _authorisationNumber As String Private _additionalIdentifier As String Private _uNLocode As String Private _gNSS As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS Private _address As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress Private _contactPerson As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._contactPerson = New DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson() Me._address = New DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress() Me._gNSS = New DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS() End Sub Public Property typeOfLocation() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsTypeOfLocation Get Return Me._typeOfLocation End Get Set Me._typeOfLocation = Value End Set End Property Public Property qualifierOfIdentification() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsQualifierOfIdentification Get Return Me._qualifierOfIdentification End Get Set Me._qualifierOfIdentification = Value End Set End Property Public Property authorisationNumber() As String Get Return Me._authorisationNumber End Get Set Me._authorisationNumber = Value End Set End Property Public Property additionalIdentifier() As String Get Return Me._additionalIdentifier End Get Set Me._additionalIdentifier = Value End Set End Property Public Property UNLocode() As String Get Return Me._uNLocode End Get Set Me._uNLocode = Value End Set End Property Public Property GNSS() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS Get Return Me._gNSS End Get Set Me._gNSS = Value End Set End Property Public Property Address() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Public Property ContactPerson() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson Get Return Me._contactPerson End Get Set Me._contactPerson = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentLocationOfGoods)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoods object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoods object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoods object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoods) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoods Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoods) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoods Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoods) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoods object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoods object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoods object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoods) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoods Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentConsignmentLocationOfGoodsTypeOfLocation A B D End Enum Public Enum DEXPDFGoodsShipmentConsignmentLocationOfGoodsQualifierOfIdentification U V W Y Z End Enum Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS #Region "Private fields" Private _latitude As String Private _longitude As String Private Shared _serializerXml As XmlSerializer #End Region Public Property latitude() As String Get Return Me._latitude End Get Set Me._latitude = Value End Set End Property Public Property longitude() As String Get Return Me._longitude End Get Set Me._longitude = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress #Region "Private fields" Private _complementOfInformation As String Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property complementOfInformation() As String Get Return Me._complementOfInformation End Get Set Me._complementOfInformation = Value End Set End Property Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson #Region "Private fields" Private _name As String Private _phoneNumber As String Private _eMailAddress As String Private Shared _serializerXml As XmlSerializer #End Region Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property phoneNumber() As String Get Return Me._phoneNumber End Get Set Me._phoneNumber = Value End Set End Property Public Property eMailAddress() As String Get Return Me._eMailAddress End Get Set Me._eMailAddress = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentDepartureTransportMeans #Region "Private fields" Private _sequenceNumber As String Private _typeOfIdentification As String Private _identificationNumber As String Private _nationality As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property typeOfIdentification() As String Get Return Me._typeOfIdentification End Get Set Me._typeOfIdentification = Value End Set End Property Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property nationality() As String Get Return Me._nationality End Get Set Me._nationality = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentDepartureTransportMeans)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment #Region "Private fields" Private _sequenceNumber As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans #Region "Private fields" Private _typeOfIdentification As String Private _identificationNumber As String Private _nationality As String Private Shared _serializerXml As XmlSerializer #End Region Public Property typeOfIdentification() As String Get Return Me._typeOfIdentification End Get Set Me._typeOfIdentification = Value End Set End Property Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property nationality() As String Get Return Me._nationality End Get Set Me._nationality = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentTransportDocument #Region "Private fields" Private _sequenceNumber As String Private _type As String Private _qualifier As String Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As String Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentTransportDocument)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentTransportDocument object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportDocument object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportDocument) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportDocument Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportDocument) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportDocument Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportDocument) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportDocument object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportDocument object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportDocument) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportDocument Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentConsignmentTransportCharges #Region "Private fields" Private _methodOfPayment As String Private Shared _serializerXml As XmlSerializer #End Region Public Property methodOfPayment() As String Get Return Me._methodOfPayment End Get Set Me._methodOfPayment = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentTransportCharges)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentConsignmentTransportCharges object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportCharges object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportCharges object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportCharges) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportCharges Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportCharges) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportCharges Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportCharges) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportCharges object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportCharges object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentConsignmentTransportCharges object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportCharges) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportCharges Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItem #Region "Private fields" Private _sequenceNumber As String Private _declarationGoodsItemNumber As String Private _statisticalValue As Decimal Private _natureOfTransaction As String Private _countryOfExport As String Private _referenceNumberUCR As String Private _registrationNumberExternal As String Private _authorisation As List(Of DEXPDFGoodsShipmentGoodsItemAuthorisation) Private _procedure As DEXPDFGoodsShipmentGoodsItemProcedure Private _consignor As DEXPDFGoodsShipmentGoodsItemConsignor Private _consignee As DEXPDFGoodsShipmentGoodsItemConsignee Private _additionalSupplyChainActor As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) Private _origin As DEXPDFGoodsShipmentGoodsItemOrigin Private _commodity As DEXPDFGoodsShipmentGoodsItemCommodity Private _packaging As List(Of DEXPDFGoodsShipmentGoodsItemPackaging) Private _previousDocument As List(Of DEXPDFGoodsShipmentGoodsItemPreviousDocument) Private _supportingDocument As List(Of DEXPDFGoodsShipmentGoodsItemSupportingDocument) Private _additionalReference As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalReference) Private _additionalInformation As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalInformation) Private _transportCharges As DEXPDFGoodsShipmentGoodsItemTransportCharges Private _outwardProcessing As DEXPDFGoodsShipmentGoodsItemOutwardProcessing Private _procedureTransference As DEXPDFGoodsShipmentGoodsItemProcedureTransference Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._procedureTransference = New DEXPDFGoodsShipmentGoodsItemProcedureTransference() Me._outwardProcessing = New DEXPDFGoodsShipmentGoodsItemOutwardProcessing() Me._transportCharges = New DEXPDFGoodsShipmentGoodsItemTransportCharges() Me._additionalInformation = New List(Of DEXPDFGoodsShipmentGoodsItemAdditionalInformation)() Me._additionalReference = New List(Of DEXPDFGoodsShipmentGoodsItemAdditionalReference)() Me._supportingDocument = New List(Of DEXPDFGoodsShipmentGoodsItemSupportingDocument)() Me._previousDocument = New List(Of DEXPDFGoodsShipmentGoodsItemPreviousDocument)() Me._packaging = New List(Of DEXPDFGoodsShipmentGoodsItemPackaging)() Me._commodity = New DEXPDFGoodsShipmentGoodsItemCommodity() Me._origin = New DEXPDFGoodsShipmentGoodsItemOrigin() Me._additionalSupplyChainActor = New List(Of DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor)() Me._consignee = New DEXPDFGoodsShipmentGoodsItemConsignee() Me._consignor = New DEXPDFGoodsShipmentGoodsItemConsignor() Me._procedure = New DEXPDFGoodsShipmentGoodsItemProcedure() Me._authorisation = New List(Of DEXPDFGoodsShipmentGoodsItemAuthorisation)() End Sub Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property declarationGoodsItemNumber() As String Get Return Me._declarationGoodsItemNumber End Get Set Me._declarationGoodsItemNumber = Value End Set End Property Public Property statisticalValue() As Decimal Get Return Me._statisticalValue End Get Set Me._statisticalValue = Value End Set End Property Public Property natureOfTransaction() As String Get Return Me._natureOfTransaction End Get Set Me._natureOfTransaction = Value End Set End Property Public Property countryOfExport() As String Get Return Me._countryOfExport End Get Set Me._countryOfExport = Value End Set End Property Public Property referenceNumberUCR() As String Get Return Me._referenceNumberUCR End Get Set Me._referenceNumberUCR = Value End Set End Property Public Property registrationNumberExternal() As String Get Return Me._registrationNumberExternal End Get Set Me._registrationNumberExternal = Value End Set End Property Public Property Authorisation() As List(Of DEXPDFGoodsShipmentGoodsItemAuthorisation) Get Return Me._authorisation End Get Set Me._authorisation = Value End Set End Property Public Property Procedure() As DEXPDFGoodsShipmentGoodsItemProcedure Get Return Me._procedure End Get Set Me._procedure = Value End Set End Property Public Property Consignor() As DEXPDFGoodsShipmentGoodsItemConsignor Get Return Me._consignor End Get Set Me._consignor = Value End Set End Property Public Property Consignee() As DEXPDFGoodsShipmentGoodsItemConsignee Get Return Me._consignee End Get Set Me._consignee = Value End Set End Property Public Property AdditionalSupplyChainActor() As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) Get Return Me._additionalSupplyChainActor End Get Set Me._additionalSupplyChainActor = Value End Set End Property Public Property Origin() As DEXPDFGoodsShipmentGoodsItemOrigin Get Return Me._origin End Get Set Me._origin = Value End Set End Property Public Property Commodity() As DEXPDFGoodsShipmentGoodsItemCommodity Get Return Me._commodity End Get Set Me._commodity = Value End Set End Property Public Property Packaging() As List(Of DEXPDFGoodsShipmentGoodsItemPackaging) Get Return Me._packaging End Get Set Me._packaging = Value End Set End Property Public Property PreviousDocument() As List(Of DEXPDFGoodsShipmentGoodsItemPreviousDocument) Get Return Me._previousDocument End Get Set Me._previousDocument = Value End Set End Property Public Property SupportingDocument() As List(Of DEXPDFGoodsShipmentGoodsItemSupportingDocument) Get Return Me._supportingDocument End Get Set Me._supportingDocument = Value End Set End Property Public Property AdditionalReference() As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalReference) Get Return Me._additionalReference End Get Set Me._additionalReference = Value End Set End Property Public Property AdditionalInformation() As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalInformation) Get Return Me._additionalInformation End Get Set Me._additionalInformation = Value End Set End Property Public Property TransportCharges() As DEXPDFGoodsShipmentGoodsItemTransportCharges Get Return Me._transportCharges End Get Set Me._transportCharges = Value End Set End Property Public Property OutwardProcessing() As DEXPDFGoodsShipmentGoodsItemOutwardProcessing Get Return Me._outwardProcessing End Get Set Me._outwardProcessing = Value End Set End Property Public Property ProcedureTransference() As DEXPDFGoodsShipmentGoodsItemProcedureTransference Get Return Me._procedureTransference End Get Set Me._procedureTransference = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItem)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItem object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItem object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItem object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItem) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItem Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItem) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItem Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItem) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItem object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItem object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItem object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItem) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItem Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemAuthorisation #Region "Private fields" Private _sequenceNumber As String Private _type As DEXPDFGoodsShipmentGoodsItemAuthorisationType Private _referenceNumber As String Private _holderOfAuthorisation As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As DEXPDFGoodsShipmentGoodsItemAuthorisationType Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Public Property holderOfAuthorisation() As String Get Return Me._holderOfAuthorisation End Get Set Me._holderOfAuthorisation = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemAuthorisation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemAuthorisation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemAuthorisation object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAuthorisation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAuthorisation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAuthorisation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAuthorisation Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAuthorisation) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemAuthorisation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAuthorisation object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAuthorisation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAuthorisation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemAuthorisationType C019 C516 C601 C626 C627 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedure #Region "Private fields" Private _requestedProcedure As String Private _previousProcedure As String Private _additionalProcedure As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._additionalProcedure = New DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure() End Sub Public Property requestedProcedure() As String Get Return Me._requestedProcedure End Get Set Me._requestedProcedure = Value End Set End Property Public Property previousProcedure() As String Get Return Me._previousProcedure End Get Set Me._previousProcedure = Value End Set End Property Public Property AdditionalProcedure() As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure Get Return Me._additionalProcedure End Get Set Me._additionalProcedure = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedure)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedure object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedure object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedure object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedure) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedure Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedure) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedure Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedure) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedure object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedure object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedure object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedure) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedure Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure #Region "Private fields" Private _sequenceNumber As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedureSequenceNumber Private _additionalProcedure As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedureSequenceNumber Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property additionalProcedure() As String Get Return Me._additionalProcedure End Get Set Me._additionalProcedure = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedureSequenceNumber Item1 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemConsignor #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFGoodsShipmentGoodsItemConsignorAddress Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._address = New DEXPDFGoodsShipmentGoodsItemConsignorAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFGoodsShipmentGoodsItemConsignorAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemConsignor)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemConsignor object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignor object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsignor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignor) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsignor Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsignor) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsignor Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsignor) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignor object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignor object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsignor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignor) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsignor Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemConsignorAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemConsignorAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemConsignorAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignorAddress object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsignorAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignorAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsignorAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsignorAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsignorAddress Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsignorAddress) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignorAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignorAddress object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsignorAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignorAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsignorAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemConsignee #Region "Private fields" Private _identificationNumber As String Private _subsidiaryNumber As String Private _name As String Private _address As DEXPDFGoodsShipmentGoodsItemConsigneeAddress Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._address = New DEXPDFGoodsShipmentGoodsItemConsigneeAddress() End Sub Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Public Property subsidiaryNumber() As String Get Return Me._subsidiaryNumber End Get Set Me._subsidiaryNumber = Value End Set End Property Public Property name() As String Get Return Me._name End Get Set Me._name = Value End Set End Property Public Property Address() As DEXPDFGoodsShipmentGoodsItemConsigneeAddress Get Return Me._address End Get Set Me._address = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemConsignee)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemConsignee object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignee object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsignee object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignee) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsignee Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsignee) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsignee Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsignee) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignee object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignee object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsignee object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignee) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsignee Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemConsigneeAddress #Region "Private fields" Private _streetAndNumber As String Private _postcode As String Private _city As String Private _country As String Private Shared _serializerXml As XmlSerializer #End Region Public Property streetAndNumber() As String Get Return Me._streetAndNumber End Get Set Me._streetAndNumber = Value End Set End Property Public Property postcode() As String Get Return Me._postcode End Get Set Me._postcode = Value End Set End Property Public Property city() As String Get Return Me._city End Get Set Me._city = Value End Set End Property Public Property country() As String Get Return Me._country End Get Set Me._country = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemConsigneeAddress)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemConsigneeAddress object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsigneeAddress object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsigneeAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsigneeAddress) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsigneeAddress Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsigneeAddress) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsigneeAddress Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsigneeAddress) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsigneeAddress object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsigneeAddress object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemConsigneeAddress object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsigneeAddress) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsigneeAddress Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor #Region "Private fields" Private _sequenceNumber As String Private _role As String Private _identificationNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property role() As String Get Return Me._role End Get Set Me._role = Value End Set End Property Public Property identificationNumber() As String Get Return Me._identificationNumber End Get Set Me._identificationNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemOrigin #Region "Private fields" Private _countryOfOrigin As String Private _regionOfDispatch As String Private Shared _serializerXml As XmlSerializer #End Region Public Property countryOfOrigin() As String Get Return Me._countryOfOrigin End Get Set Me._countryOfOrigin = Value End Set End Property Public Property regionOfDispatch() As String Get Return Me._regionOfDispatch End Get Set Me._regionOfDispatch = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemOrigin)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemOrigin object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemOrigin object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemOrigin object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOrigin) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemOrigin Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemOrigin) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemOrigin Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemOrigin) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemOrigin object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemOrigin object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemOrigin object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOrigin) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemOrigin Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodity #Region "Private fields" Private _descriptionOfGoods As String Private _cusCode As String Private _commodityCode As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode Private _dangerousGoods As List(Of DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) Private _goodsMeasure As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._goodsMeasure = New DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure() Me._dangerousGoods = New List(Of DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods)() Me._commodityCode = New DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode() End Sub Public Property descriptionOfGoods() As String Get Return Me._descriptionOfGoods End Get Set Me._descriptionOfGoods = Value End Set End Property Public Property cusCode() As String Get Return Me._cusCode End Get Set Me._cusCode = Value End Set End Property Public Property CommodityCode() As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode Get Return Me._commodityCode End Get Set Me._commodityCode = Value End Set End Property Public Property DangerousGoods() As List(Of DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) Get Return Me._dangerousGoods End Get Set Me._dangerousGoods = Value End Set End Property Public Property GoodsMeasure() As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure Get Return Me._goodsMeasure End Get Set Me._goodsMeasure = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodity)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodity object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodity object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodity) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodity Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodity) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodity Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodity) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodity object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodity object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodity) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodity Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode #Region "Private fields" Private _harmonizedSystemSubHeadingCode As String Private _combinedNomenclatureCode As String Private _tARICAdditionalCode As List(Of DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._tARICAdditionalCode = New List(Of DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode)() End Sub Public Property harmonizedSystemSubHeadingCode() As String Get Return Me._harmonizedSystemSubHeadingCode End Get Set Me._harmonizedSystemSubHeadingCode = Value End Set End Property Public Property combinedNomenclatureCode() As String Get Return Me._combinedNomenclatureCode End Get Set Me._combinedNomenclatureCode = Value End Set End Property Public Property TARICAdditionalCode() As List(Of DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) Get Return Me._tARICAdditionalCode End Get Set Me._tARICAdditionalCode = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode #Region "Private fields" Private _sequenceNumber As String Private _taricAdditionalCode As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property taricAdditionalCode() As String Get Return Me._taricAdditionalCode End Get Set Me._taricAdditionalCode = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods #Region "Private fields" Private _sequenceNumber As String Private _uNNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property UNNumber() As String Get Return Me._uNNumber End Get Set Me._uNNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure #Region "Private fields" Private _grossMass As Decimal Private _netMass As Decimal Private _supplementaryUnits As Decimal Private Shared _serializerXml As XmlSerializer #End Region Public Property grossMass() As Decimal Get Return Me._grossMass End Get Set Me._grossMass = Value End Set End Property Public Property netMass() As Decimal Get Return Me._netMass End Get Set Me._netMass = Value End Set End Property Public Property supplementaryUnits() As Decimal Get Return Me._supplementaryUnits End Get Set Me._supplementaryUnits = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemPackaging #Region "Private fields" Private _sequenceNumber As String Private _typeOfPackages As String Private _numberOfPackages As String Private _shippingMarks As String Private _packageReference As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._packageReference = New DEXPDFGoodsShipmentGoodsItemPackagingPackageReference() End Sub Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property typeOfPackages() As String Get Return Me._typeOfPackages End Get Set Me._typeOfPackages = Value End Set End Property Public Property numberOfPackages() As String Get Return Me._numberOfPackages End Get Set Me._numberOfPackages = Value End Set End Property Public Property shippingMarks() As String Get Return Me._shippingMarks End Get Set Me._shippingMarks = Value End Set End Property Public Property PackageReference() As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference Get Return Me._packageReference End Get Set Me._packageReference = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemPackaging)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemPackaging object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemPackaging object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemPackaging object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackaging) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemPackaging Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemPackaging) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemPackaging Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemPackaging) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemPackaging object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPackaging object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemPackaging object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackaging) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemPackaging Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemPackagingPackageReference #Region "Private fields" Private _declarationGoodsItemNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property declarationGoodsItemNumber() As String Get Return Me._declarationGoodsItemNumber End Get Set Me._declarationGoodsItemNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemPackagingPackageReference)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemPreviousDocument #Region "Private fields" Private _sequenceNumber As String Private _type As String Private _qualifier As String Private _referenceNumber As String Private _goodsItemNumber As String Private _measurementUnitAndQualifier As String Private _quantity As Decimal Private _complementOfInformation As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As String Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Public Property goodsItemNumber() As String Get Return Me._goodsItemNumber End Get Set Me._goodsItemNumber = Value End Set End Property Public Property measurementUnitAndQualifier() As String Get Return Me._measurementUnitAndQualifier End Get Set Me._measurementUnitAndQualifier = Value End Set End Property Public Property quantity() As Decimal Get Return Me._quantity End Get Set Me._quantity = Value End Set End Property Public Property complementOfInformation() As String Get Return Me._complementOfInformation End Get Set Me._complementOfInformation = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemPreviousDocument)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemPreviousDocument object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemPreviousDocument object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemPreviousDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPreviousDocument) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemPreviousDocument Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemPreviousDocument) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemPreviousDocument Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemPreviousDocument) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemPreviousDocument object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPreviousDocument object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemPreviousDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPreviousDocument) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemPreviousDocument Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemSupportingDocument #Region "Private fields" Private _sequenceNumber As String Private _type As String Private _qualifier As String Private _referenceNumber As String Private _documentLineItemNumber As String Private _complementOfInformation As String Private _detail As String Private _issuingAuthorityName As String Private _issuingDate As Date Private _validityDate As Date Private _measurementUnitAndQualifier As String Private _complementaryUnit As DEXPDFGoodsShipmentGoodsItemSupportingDocumentComplementaryUnit Private _quantity As Decimal Private _currency As String Private _amount As Decimal Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As String Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Public Property documentLineItemNumber() As String Get Return Me._documentLineItemNumber End Get Set Me._documentLineItemNumber = Value End Set End Property Public Property complementOfInformation() As String Get Return Me._complementOfInformation End Get Set Me._complementOfInformation = Value End Set End Property Public Property detail() As String Get Return Me._detail End Get Set Me._detail = Value End Set End Property Public Property issuingAuthorityName() As String Get Return Me._issuingAuthorityName End Get Set Me._issuingAuthorityName = Value End Set End Property Public Property issuingDate() As Date Get Return Me._issuingDate End Get Set Me._issuingDate = Value End Set End Property Public Property validityDate() As Date Get Return Me._validityDate End Get Set Me._validityDate = Value End Set End Property Public Property measurementUnitAndQualifier() As String Get Return Me._measurementUnitAndQualifier End Get Set Me._measurementUnitAndQualifier = Value End Set End Property Public Property complementaryUnit() As DEXPDFGoodsShipmentGoodsItemSupportingDocumentComplementaryUnit Get Return Me._complementaryUnit End Get Set Me._complementaryUnit = Value End Set End Property Public Property quantity() As Decimal Get Return Me._quantity End Get Set Me._quantity = Value End Set End Property Public Property currency() As String Get Return Me._currency End Get Set Me._currency = Value End Set End Property Public Property amount() As Decimal Get Return Me._amount End Get Set Me._amount = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemSupportingDocument)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemSupportingDocument object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemSupportingDocument object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemSupportingDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemSupportingDocument) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemSupportingDocument Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemSupportingDocument) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemSupportingDocument Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemSupportingDocument) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemSupportingDocument object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemSupportingDocument object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemSupportingDocument object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemSupportingDocument) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemSupportingDocument Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemSupportingDocumentComplementaryUnit Los Mio Paar Satz St Syst cbm cm div g gPu gTh gU kg kgPu kgTh kgU km l lfm ltAnlage m mg ml mm qcm qm t tU µg µl µm End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemAdditionalReference #Region "Private fields" Private _sequenceNumber As String Private _type As String Private _qualifier As String Private _referenceNumber As String Private _detail As String Private _currency As String Private _amount As Decimal Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property type() As String Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Public Property detail() As String Get Return Me._detail End Get Set Me._detail = Value End Set End Property Public Property currency() As String Get Return Me._currency End Get Set Me._currency = Value End Set End Property Public Property amount() As Decimal Get Return Me._amount End Get Set Me._amount = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemAdditionalReference)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalReference object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalReference object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalReference) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAdditionalReference Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAdditionalReference) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAdditionalReference Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAdditionalReference) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalReference object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalReference object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalReference) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAdditionalReference Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemAdditionalInformation #Region "Private fields" Private _sequenceNumber As String Private _code As String Private _text As String Private Shared _serializerXml As XmlSerializer #End Region Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property code() As String Get Return Me._code End Get Set Me._code = Value End Set End Property Public Property text() As String Get Return Me._text End Get Set Me._text = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemAdditionalInformation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalInformation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalInformation object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalInformation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalInformation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAdditionalInformation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAdditionalInformation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAdditionalInformation Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAdditionalInformation) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalInformation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalInformation object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalInformation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalInformation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAdditionalInformation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemTransportCharges #Region "Private fields" Private _methodOfPayment As String Private Shared _serializerXml As XmlSerializer #End Region Public Property methodOfPayment() As String Get Return Me._methodOfPayment End Get Set Me._methodOfPayment = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemTransportCharges)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemTransportCharges object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemTransportCharges object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemTransportCharges object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemTransportCharges) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemTransportCharges Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemTransportCharges) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemTransportCharges Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemTransportCharges) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemTransportCharges object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemTransportCharges object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemTransportCharges object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemTransportCharges) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemTransportCharges Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemOutwardProcessing #Region "Private fields" Private _replacement As DEXPDFGoodsShipmentGoodsItemOutwardProcessingReplacement Private _reimportDate As Date Private Shared _serializerXml As XmlSerializer #End Region Public Property replacement() As DEXPDFGoodsShipmentGoodsItemOutwardProcessingReplacement Get Return Me._replacement End Get Set Me._replacement = Value End Set End Property Public Property reimportDate() As Date Get Return Me._reimportDate End Get Set Me._reimportDate = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemOutwardProcessing)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemOutwardProcessing object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemOutwardProcessing object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemOutwardProcessing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOutwardProcessing) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemOutwardProcessing Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemOutwardProcessing) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemOutwardProcessing Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemOutwardProcessing) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemOutwardProcessing object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemOutwardProcessing object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemOutwardProcessing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOutwardProcessing) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemOutwardProcessing Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemOutwardProcessingReplacement Item0 Item1 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransference #Region "Private fields" Private _customsWarehousing As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing Private _inwardProcessing As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._inwardProcessing = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing() Me._customsWarehousing = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing() End Sub Public Property CustomsWarehousing() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing Get Return Me._customsWarehousing End Get Set Me._customsWarehousing = Value End Set End Property Public Property InwardProcessing() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing Get Return Me._inwardProcessing End Get Set Me._inwardProcessing = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransference)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransference object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransference object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransference) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransference Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransference) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransference Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransference) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransference object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransference object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransference) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransference Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing #Region "Private fields" Private _lRN As String Private _authorisation As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation Private _goodsReference As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._goodsReference = New List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference)() Me._authorisation = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation() End Sub Public Property LRN() As String Get Return Me._lRN End Get Set Me._lRN = Value End Set End Property Public Property Authorisation() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation Get Return Me._authorisation End Get Set Me._authorisation = Value End Set End Property Public Property GoodsReference() As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) Get Return Me._goodsReference End Get Set Me._goodsReference = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation #Region "Private fields" Private _type As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisationType Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property type() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisationType Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisationType C517 C518 C519 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference #Region "Private fields" Private _sequenceNumber As String Private _accessViaATLAS As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceAccessViaATLAS Private _mRN As String Private _registrationNumber As String Private _goodsItemNumber As String Private _usualTreatment As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceUsualTreatment Private _complementOfInformation As String Private _commodity As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._commodity = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity() End Sub Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property accessViaATLAS() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceAccessViaATLAS Get Return Me._accessViaATLAS End Get Set Me._accessViaATLAS = Value End Set End Property Public Property MRN() As String Get Return Me._mRN End Get Set Me._mRN = Value End Set End Property Public Property registrationNumber() As String Get Return Me._registrationNumber End Get Set Me._registrationNumber = Value End Set End Property Public Property goodsItemNumber() As String Get Return Me._goodsItemNumber End Get Set Me._goodsItemNumber = Value End Set End Property Public Property usualTreatment() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceUsualTreatment Get Return Me._usualTreatment End Get Set Me._usualTreatment = Value End Set End Property Public Property complementOfInformation() As String Get Return Me._complementOfInformation End Get Set Me._complementOfInformation = Value End Set End Property Public Property Commodity() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity Get Return Me._commodity End Get Set Me._commodity = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceAccessViaATLAS Item0 Item1 End Enum Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceUsualTreatment Item0 Item1 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity #Region "Private fields" Private _commodityCode As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode Private _goodsReduction As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction Private _goodsReductionAfterTreatment As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._goodsReductionAfterTreatment = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment() Me._goodsReduction = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction() Me._commodityCode = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode() End Sub Public Property CommodityCode() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode Get Return Me._commodityCode End Get Set Me._commodityCode = Value End Set End Property Public Property GoodsReduction() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction Get Return Me._goodsReduction End Get Set Me._goodsReduction = Value End Set End Property Public Property GoodsReductionAfterTreatment() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment Get Return Me._goodsReductionAfterTreatment End Get Set Me._goodsReductionAfterTreatment = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode #Region "Private fields" Private _harmonizedSystemSubHeadingCode As String Private _combinedNomenclatureCode As String Private _taricCode As String Private _nationalAdditionalCode As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._nationalAdditionalCode = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode() End Sub Public Property harmonizedSystemSubHeadingCode() As String Get Return Me._harmonizedSystemSubHeadingCode End Get Set Me._harmonizedSystemSubHeadingCode = Value End Set End Property Public Property combinedNomenclatureCode() As String Get Return Me._combinedNomenclatureCode End Get Set Me._combinedNomenclatureCode = Value End Set End Property Public Property taricCode() As String Get Return Me._taricCode End Get Set Me._taricCode = Value End Set End Property Public Property NationalAdditionalCode() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode Get Return Me._nationalAdditionalCode End Get Set Me._nationalAdditionalCode = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode #Region "Private fields" Private _nationalAdditionalCode As String Private Shared _serializerXml As XmlSerializer #End Region Public Property nationalAdditionalCode() As String Get Return Me._nationalAdditionalCode End Get Set Me._nationalAdditionalCode = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction #Region "Private fields" Private _measurementUnit As String Private _qualifier As String Private _quantity As Decimal Private Shared _serializerXml As XmlSerializer #End Region Public Property measurementUnit() As String Get Return Me._measurementUnit End Get Set Me._measurementUnit = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property quantity() As Decimal Get Return Me._quantity End Get Set Me._quantity = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment #Region "Private fields" Private _measurementUnit As String Private _qualifier As String Private _quantity As Decimal Private Shared _serializerXml As XmlSerializer #End Region Public Property measurementUnit() As String Get Return Me._measurementUnit End Get Set Me._measurementUnit = Value End Set End Property Public Property qualifier() As String Get Return Me._qualifier End Get Set Me._qualifier = Value End Set End Property Public Property quantity() As Decimal Get Return Me._quantity End Get Set Me._quantity = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing #Region "Private fields" Private _simplyGrantedAuthorisation As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingSimplyGrantedAuthorisation Private _authorisation As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation Private _customsOfficeOfSupervision As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision Private _goodsReference As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._goodsReference = New List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference)() Me._customsOfficeOfSupervision = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision() Me._authorisation = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation() End Sub Public Property simplyGrantedAuthorisation() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingSimplyGrantedAuthorisation Get Return Me._simplyGrantedAuthorisation End Get Set Me._simplyGrantedAuthorisation = Value End Set End Property Public Property Authorisation() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation Get Return Me._authorisation End Get Set Me._authorisation = Value End Set End Property Public Property CustomsOfficeOfSupervision() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision Get Return Me._customsOfficeOfSupervision End Get Set Me._customsOfficeOfSupervision = Value End Set End Property Public Property GoodsReference() As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) Get Return Me._goodsReference End Get Set Me._goodsReference = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingSimplyGrantedAuthorisation Item0 Item1 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation #Region "Private fields" Private _type As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisationType Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property type() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisationType Get Return Me._type End Get Set Me._type = Value End Set End Property Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisationType C601 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision #Region "Private fields" Private _referenceNumber As String Private Shared _serializerXml As XmlSerializer #End Region Public Property referenceNumber() As String Get Return Me._referenceNumber End Get Set Me._referenceNumber = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference #Region "Private fields" Private _sequenceNumber As String Private _accessViaATLAS As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceAccessViaATLAS Private _mRN As String Private _registrationNumber As String Private _goodsItemNumber As String Private _commodity As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._commodity = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity() End Sub Public Property sequenceNumber() As String Get Return Me._sequenceNumber End Get Set Me._sequenceNumber = Value End Set End Property Public Property accessViaATLAS() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceAccessViaATLAS Get Return Me._accessViaATLAS End Get Set Me._accessViaATLAS = Value End Set End Property Public Property MRN() As String Get Return Me._mRN End Get Set Me._mRN = Value End Set End Property Public Property registrationNumber() As String Get Return Me._registrationNumber End Get Set Me._registrationNumber = Value End Set End Property Public Property goodsItemNumber() As String Get Return Me._goodsItemNumber End Get Set Me._goodsItemNumber = Value End Set End Property Public Property Commodity() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity Get Return Me._commodity End Get Set Me._commodity = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceAccessViaATLAS Item0 Item1 End Enum Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity #Region "Private fields" Private _goodsRelatedData As String Private Shared _serializerXml As XmlSerializer #End Region Public Property goodsRelatedData() As String Get Return Me._goodsRelatedData End Get Set Me._goodsRelatedData = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object ''' ''' string to deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) Try obj = Deserialize(input) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean Dim exception As System.Exception = Nothing Return Deserialize(input, obj, exception) End Function Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) End Function #End Region ''' ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object ''' ''' File to load and deserialize ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) Try obj = LoadFromFile(fileName) Return True Catch ex As System.Exception exception = ex Return False End Try End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean Dim exception As System.Exception = Nothing Return LoadFromFile(fileName, obj, exception) End Function Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class End Namespace #Enable Warning