'' ------------------------------------------------------------------------------
''
'' Generated by Xsd2Code++. Version 4.4.0.7
'' DEXPDDListVisualBasicFalseFalseFalseOnlyIfDifferentFalseNet45AllTrueTrueTrueFalseFalseFalseFalseFalseNoneStartWithUnderscoreFalseFalseFalseFalseFalsePublicTrueFalseFalseFalseFalseFalseFalseFalseFalseTrueTrueTrueFalseTrueSerializeDeserializeSaveToFileLoadFromFileFalseTrueIndent2SpaceFalseFalseUTF8XmlSerializerFalseFalseFalseFalseFalseFalseFalseEntityBaseFalseFalse
''
'' ------------------------------------------------------------------------------
Imports System
Imports System.Diagnostics
Imports System.Xml.Serialization
Imports System.Collections
Imports System.Xml.Schema
Imports System.ComponentModel
Imports System.IO
Imports System.Text
Imports System.Xml
Imports System.Collections.Generic
Namespace DEXPDD
_
Partial Public Class DEXPDD
#Region "Private fields"
Private _interchangeSender As DEXPDDInterchangeSender
Private _interchangeRecipient As DEXPDDInterchangeRecipient
Private _preparation As DEXPDDPreparation
Private _interchangeControlReference As String
Private _messageGroup As DEXPDDMessageGroup
Private _messageReferenceNumber As String
Private _messageType As DEXPDDMessageType
Private _messageIdentifier As String
Private _header As DEXPDDHeader
Private _goodsLoadingPlace As DEXPDDGoodsLoadingPlace
Private _exportCustomsOffice As DEXPDDExportCustomsOffice
Private _supplementaryDeclarationCustomsOffice As DEXPDDSupplementaryDeclarationCustomsOffice
Private _intendedExitCustomsOffice As DEXPDDIntendedExitCustomsOffice
Private _actualExitCustomsOffice As DEXPDDActualExitCustomsOffice
Private _transaction As DEXPDDTransaction
Private _specialFact As List(Of DEXPDDSpecialFact)
Private _itinerary As List(Of DEXPDDItinerary)
Private _seals As DEXPDDSeals
Private _presentationPackingLoading As DEXPDDPresentationPackingLoading
Private _exporter As DEXPDDExporter
Private _declarant As DEXPDDDeclarant
Private _representative As DEXPDDRepresentative
Private _contractor As DEXPDDContractor
Private _outwardProcessingOwner As DEXPDDOutwardProcessingOwner
Private _consignee As DEXPDDConsignee
Private _deliveryTerms As DEXPDDDeliveryTerms
Private _outwardProcessing As DEXPDDOutwardProcessing
Private _goodsItem As List(Of DEXPDDGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._goodsItem = New List(Of DEXPDDGoodsItem)()
Me._outwardProcessing = New DEXPDDOutwardProcessing()
Me._deliveryTerms = New DEXPDDDeliveryTerms()
Me._consignee = New DEXPDDConsignee()
Me._outwardProcessingOwner = New DEXPDDOutwardProcessingOwner()
Me._contractor = New DEXPDDContractor()
Me._representative = New DEXPDDRepresentative()
Me._declarant = New DEXPDDDeclarant()
Me._exporter = New DEXPDDExporter()
Me._presentationPackingLoading = New DEXPDDPresentationPackingLoading()
Me._seals = New DEXPDDSeals()
Me._itinerary = New List(Of DEXPDDItinerary)()
Me._specialFact = New List(Of DEXPDDSpecialFact)()
Me._transaction = New DEXPDDTransaction()
Me._actualExitCustomsOffice = New DEXPDDActualExitCustomsOffice()
Me._intendedExitCustomsOffice = New DEXPDDIntendedExitCustomsOffice()
Me._supplementaryDeclarationCustomsOffice = New DEXPDDSupplementaryDeclarationCustomsOffice()
Me._exportCustomsOffice = New DEXPDDExportCustomsOffice()
Me._goodsLoadingPlace = New DEXPDDGoodsLoadingPlace()
Me._header = New DEXPDDHeader()
Me._preparation = New DEXPDDPreparation()
Me._interchangeRecipient = New DEXPDDInterchangeRecipient()
Me._interchangeSender = New DEXPDDInterchangeSender()
End Sub
Public Property InterchangeSender() As DEXPDDInterchangeSender
Get
Return Me._interchangeSender
End Get
Set(value As DEXPDDInterchangeSender)
Me._interchangeSender = Value
End Set
End Property
Public Property InterchangeRecipient() As DEXPDDInterchangeRecipient
Get
Return Me._interchangeRecipient
End Get
Set(value As DEXPDDInterchangeRecipient)
Me._interchangeRecipient = Value
End Set
End Property
Public Property Preparation() As DEXPDDPreparation
Get
Return Me._preparation
End Get
Set(value As DEXPDDPreparation)
Me._preparation = Value
End Set
End Property
_
Public Property InterchangeControlReference() As String
Get
Return Me._interchangeControlReference
End Get
Set(value As String)
Me._interchangeControlReference = Value
End Set
End Property
Public Property MessageGroup() As DEXPDDMessageGroup
Get
Return Me._messageGroup
End Get
Set(value As DEXPDDMessageGroup)
Me._messageGroup = Value
End Set
End Property
_
Public Property MessageReferenceNumber() As String
Get
Return Me._messageReferenceNumber
End Get
Set(value As String)
Me._messageReferenceNumber = Value
End Set
End Property
Public Property MessageType() As DEXPDDMessageType
Get
Return Me._messageType
End Get
Set(value As DEXPDDMessageType)
Me._messageType = Value
End Set
End Property
_
Public Property MessageIdentifier() As String
Get
Return Me._messageIdentifier
End Get
Set(value As String)
Me._messageIdentifier = Value
End Set
End Property
Public Property Header() As DEXPDDHeader
Get
Return Me._header
End Get
Set(value As DEXPDDHeader)
Me._header = Value
End Set
End Property
_
Public Property GoodsLoadingPlace() As DEXPDDGoodsLoadingPlace
Get
Return Me._goodsLoadingPlace
End Get
Set(value As DEXPDDGoodsLoadingPlace)
Me._goodsLoadingPlace = Value
End Set
End Property
Public Property ExportCustomsOffice() As DEXPDDExportCustomsOffice
Get
Return Me._exportCustomsOffice
End Get
Set(value As DEXPDDExportCustomsOffice)
Me._exportCustomsOffice = Value
End Set
End Property
Public Property SupplementaryDeclarationCustomsOffice() As DEXPDDSupplementaryDeclarationCustomsOffice
Get
Return Me._supplementaryDeclarationCustomsOffice
End Get
Set(value As DEXPDDSupplementaryDeclarationCustomsOffice)
Me._supplementaryDeclarationCustomsOffice = Value
End Set
End Property
Public Property IntendedExitCustomsOffice() As DEXPDDIntendedExitCustomsOffice
Get
Return Me._intendedExitCustomsOffice
End Get
Set(value As DEXPDDIntendedExitCustomsOffice)
Me._intendedExitCustomsOffice = Value
End Set
End Property
Public Property ActualExitCustomsOffice() As DEXPDDActualExitCustomsOffice
Get
Return Me._actualExitCustomsOffice
End Get
Set(value As DEXPDDActualExitCustomsOffice)
Me._actualExitCustomsOffice = Value
End Set
End Property
Public Property Transaction() As DEXPDDTransaction
Get
Return Me._transaction
End Get
Set(value As DEXPDDTransaction)
Me._transaction = Value
End Set
End Property
_
Public Property SpecialFact() As List(Of DEXPDDSpecialFact)
Get
Return Me._specialFact
End Get
Set(value As List(Of DEXPDDSpecialFact))
Me._specialFact = Value
End Set
End Property
_
Public Property Itinerary() As List(Of DEXPDDItinerary)
Get
Return Me._itinerary
End Get
Set(value As List(Of DEXPDDItinerary))
Me._itinerary = Value
End Set
End Property
Public Property Seals() As DEXPDDSeals
Get
Return Me._seals
End Get
Set(value As DEXPDDSeals)
Me._seals = Value
End Set
End Property
Public Property PresentationPackingLoading() As DEXPDDPresentationPackingLoading
Get
Return Me._presentationPackingLoading
End Get
Set(value As DEXPDDPresentationPackingLoading)
Me._presentationPackingLoading = Value
End Set
End Property
Public Property Exporter() As DEXPDDExporter
Get
Return Me._exporter
End Get
Set(value As DEXPDDExporter)
Me._exporter = Value
End Set
End Property
Public Property Declarant() As DEXPDDDeclarant
Get
Return Me._declarant
End Get
Set(value As DEXPDDDeclarant)
Me._declarant = Value
End Set
End Property
Public Property Representative() As DEXPDDRepresentative
Get
Return Me._representative
End Get
Set(value As DEXPDDRepresentative)
Me._representative = Value
End Set
End Property
Public Property Contractor() As DEXPDDContractor
Get
Return Me._contractor
End Get
Set(value As DEXPDDContractor)
Me._contractor = Value
End Set
End Property
Public Property OutwardProcessingOwner() As DEXPDDOutwardProcessingOwner
Get
Return Me._outwardProcessingOwner
End Get
Set(value As DEXPDDOutwardProcessingOwner)
Me._outwardProcessingOwner = Value
End Set
End Property
Public Property Consignee() As DEXPDDConsignee
Get
Return Me._consignee
End Get
Set(value As DEXPDDConsignee)
Me._consignee = Value
End Set
End Property
Public Property DeliveryTerms() As DEXPDDDeliveryTerms
Get
Return Me._deliveryTerms
End Get
Set(value As DEXPDDDeliveryTerms)
Me._deliveryTerms = Value
End Set
End Property
Public Property OutwardProcessing() As DEXPDDOutwardProcessing
Get
Return Me._outwardProcessing
End Get
Set(value As DEXPDDOutwardProcessing)
Me._outwardProcessing = Value
End Set
End Property
_
Public Property GoodsItem() As List(Of DEXPDDGoodsItem)
Get
Return Me._goodsItem
End Get
Set(value As List(Of DEXPDDGoodsItem))
Me._goodsItem = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDD))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDD object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDD object
'''
''' string workflow markup to deserialize
''' Output DEXPDD 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 DEXPDD, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDD)
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 DEXPDD) 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 DEXPDD
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDD)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDD
Return CType(Serializer.Deserialize(s), DEXPDD)
End Function
#End Region
'''
''' Serializes current DEXPDD 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDD object
'''
''' string xml file to load and deserialize
''' Output DEXPDD 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 DEXPDD, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDD)
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 DEXPDD) 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 DEXPDD
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDInterchangeSender
#Region "Private fields"
Private _identification As DEXPDDInterchangeSenderIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._identification = New DEXPDDInterchangeSenderIdentification()
End Sub
Public Property Identification() As DEXPDDInterchangeSenderIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDInterchangeSenderIdentification)
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDInterchangeSender))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDInterchangeSender object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDInterchangeSender object
'''
''' string workflow markup to deserialize
''' Output DEXPDDInterchangeSender 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 DEXPDDInterchangeSender, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeSender)
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 DEXPDDInterchangeSender) 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 DEXPDDInterchangeSender
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDInterchangeSender)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDInterchangeSender
Return CType(Serializer.Deserialize(s), DEXPDDInterchangeSender)
End Function
#End Region
'''
''' Serializes current DEXPDDInterchangeSender 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDInterchangeSender object
'''
''' string xml file to load and deserialize
''' Output DEXPDDInterchangeSender 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 DEXPDDInterchangeSender, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeSender)
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 DEXPDDInterchangeSender) 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 DEXPDDInterchangeSender
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDInterchangeSenderIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
_
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set(value As String)
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDInterchangeSenderIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDInterchangeSenderIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDInterchangeSenderIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDInterchangeSenderIdentification 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 DEXPDDInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeSenderIdentification)
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 DEXPDDInterchangeSenderIdentification) 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 DEXPDDInterchangeSenderIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDInterchangeSenderIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDInterchangeSenderIdentification
Return CType(Serializer.Deserialize(s), DEXPDDInterchangeSenderIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDInterchangeSenderIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDInterchangeSenderIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDInterchangeSenderIdentification 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 DEXPDDInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeSenderIdentification)
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 DEXPDDInterchangeSenderIdentification) 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 DEXPDDInterchangeSenderIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDInterchangeRecipient
#Region "Private fields"
Private _identification As DEXPDDInterchangeRecipientIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._identification = New DEXPDDInterchangeRecipientIdentification()
End Sub
Public Property Identification() As DEXPDDInterchangeRecipientIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDInterchangeRecipientIdentification)
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDInterchangeRecipient))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDInterchangeRecipient object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDInterchangeRecipient object
'''
''' string workflow markup to deserialize
''' Output DEXPDDInterchangeRecipient 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 DEXPDDInterchangeRecipient, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeRecipient)
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 DEXPDDInterchangeRecipient) 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 DEXPDDInterchangeRecipient
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDInterchangeRecipient)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDInterchangeRecipient
Return CType(Serializer.Deserialize(s), DEXPDDInterchangeRecipient)
End Function
#End Region
'''
''' Serializes current DEXPDDInterchangeRecipient 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDInterchangeRecipient object
'''
''' string xml file to load and deserialize
''' Output DEXPDDInterchangeRecipient 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 DEXPDDInterchangeRecipient, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeRecipient)
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 DEXPDDInterchangeRecipient) 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 DEXPDDInterchangeRecipient
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDInterchangeRecipientIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDInterchangeRecipientIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDInterchangeRecipientIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDInterchangeRecipientIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDInterchangeRecipientIdentification 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 DEXPDDInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeRecipientIdentification)
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 DEXPDDInterchangeRecipientIdentification) 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 DEXPDDInterchangeRecipientIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDInterchangeRecipientIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDInterchangeRecipientIdentification
Return CType(Serializer.Deserialize(s), DEXPDDInterchangeRecipientIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDInterchangeRecipientIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDInterchangeRecipientIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDInterchangeRecipientIdentification 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 DEXPDDInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDInterchangeRecipientIdentification)
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 DEXPDDInterchangeRecipientIdentification) 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 DEXPDDInterchangeRecipientIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDPreparation
#Region "Private fields"
Private _date As Date
Private _time As Date
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property [Date]() As Date
Get
Return Me._date
End Get
Set(value As Date)
Me._date = Value
End Set
End Property
_
Public Property Time() As Date
Get
Return Me._time
End Get
Set(value As Date)
Me._time = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDPreparation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDPreparation object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDPreparation object
'''
''' string workflow markup to deserialize
''' Output DEXPDDPreparation 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 DEXPDDPreparation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDPreparation)
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 DEXPDDPreparation) 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 DEXPDDPreparation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDPreparation)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDPreparation
Return CType(Serializer.Deserialize(s), DEXPDDPreparation)
End Function
#End Region
'''
''' Serializes current DEXPDDPreparation 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDPreparation object
'''
''' string xml file to load and deserialize
''' Output DEXPDDPreparation 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 DEXPDDPreparation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDPreparation)
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 DEXPDDPreparation) 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 DEXPDDPreparation
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDMessageGroup
'''
EXP
End Enum
_
Public Enum DEXPDDMessageType
'''
DEXPDD
End Enum
_
Partial Public Class DEXPDDHeader
#Region "Private fields"
Private _declaration As DEXPDDHeaderDeclaration
Private _movementReferenceNumber As String
Private _messageVersion As String
Private _exportCountry As String
Private _destinationCountry As String
Private _declarationDateTime As Date
Private _decisiveDate As Date
Private _exitDate As Date
Private _specificCircumstanceIndicator As String
Private _transportChargesPaymentMethod As String
Private _partyConstellation As DEXPDDHeaderPartyConstellation
Private _containerFlag As DEXPDDHeaderContainerFlag
Private _totalGrossMassMeasure As Decimal
Private _registrationNumber As String
Private _annotation As String
Private _commercialReferenceNumber As String
Private _localReferenceNumber As String
Private _goodsItemQuantity As String
Private _authorizationNumber As String
Private _customsAuthorization As DEXPDDHeaderCustomsAuthorization
Private _inlandTransportMeans As DEXPDDHeaderInlandTransportMeans
Private _departureTransportMeans As DEXPDDHeaderDepartureTransportMeans
Private _borderTransportMeans As DEXPDDHeaderBorderTransportMeans
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._borderTransportMeans = New DEXPDDHeaderBorderTransportMeans()
Me._departureTransportMeans = New DEXPDDHeaderDepartureTransportMeans()
Me._inlandTransportMeans = New DEXPDDHeaderInlandTransportMeans()
Me._customsAuthorization = New DEXPDDHeaderCustomsAuthorization()
Me._declaration = New DEXPDDHeaderDeclaration()
End Sub
Public Property Declaration() As DEXPDDHeaderDeclaration
Get
Return Me._declaration
End Get
Set(value As DEXPDDHeaderDeclaration)
Me._declaration = Value
End Set
End Property
_
Public Property MovementReferenceNumber() As String
Get
Return Me._movementReferenceNumber
End Get
Set(value As String)
Me._movementReferenceNumber = Value
End Set
End Property
_
Public Property MessageVersion() As String
Get
Return Me._messageVersion
End Get
Set(value As String)
Me._messageVersion = Value
End Set
End Property
_
Public Property ExportCountry() As String
Get
Return Me._exportCountry
End Get
Set(value As String)
Me._exportCountry = Value
End Set
End Property
_
Public Property DestinationCountry() As String
Get
Return Me._destinationCountry
End Get
Set(value As String)
Me._destinationCountry = Value
End Set
End Property
Public Property DeclarationDateTime() As Date
Get
Return Me._declarationDateTime
End Get
Set(value As Date)
Me._declarationDateTime = Value
End Set
End Property
_
Public Property DecisiveDate() As Date
Get
Return Me._decisiveDate
End Get
Set(value As Date)
Me._decisiveDate = Value
End Set
End Property
_
Public Property ExitDate() As Date
Get
Return Me._exitDate
End Get
Set(value As Date)
Me._exitDate = Value
End Set
End Property
_
Public Property SpecificCircumstanceIndicator() As String
Get
Return Me._specificCircumstanceIndicator
End Get
Set(value As String)
Me._specificCircumstanceIndicator = Value
End Set
End Property
_
Public Property TransportChargesPaymentMethod() As String
Get
Return Me._transportChargesPaymentMethod
End Get
Set(value As String)
Me._transportChargesPaymentMethod = Value
End Set
End Property
Public Property PartyConstellation() As DEXPDDHeaderPartyConstellation
Get
Return Me._partyConstellation
End Get
Set(value As DEXPDDHeaderPartyConstellation)
Me._partyConstellation = Value
End Set
End Property
Public Property ContainerFlag() As DEXPDDHeaderContainerFlag
Get
Return Me._containerFlag
End Get
Set(value As DEXPDDHeaderContainerFlag)
Me._containerFlag = Value
End Set
End Property
Public Property TotalGrossMassMeasure() As Decimal
Get
Return Me._totalGrossMassMeasure
End Get
Set(value As Decimal)
Me._totalGrossMassMeasure = Value
End Set
End Property
_
Public Property RegistrationNumber() As String
Get
Return Me._registrationNumber
End Get
Set(value As String)
Me._registrationNumber = Value
End Set
End Property
_
Public Property Annotation() As String
Get
Return Me._annotation
End Get
Set(value As String)
Me._annotation = Value
End Set
End Property
_
Public Property CommercialReferenceNumber() As String
Get
Return Me._commercialReferenceNumber
End Get
Set(value As String)
Me._commercialReferenceNumber = Value
End Set
End Property
_
Public Property LocalReferenceNumber() As String
Get
Return Me._localReferenceNumber
End Get
Set(value As String)
Me._localReferenceNumber = Value
End Set
End Property
_
Public Property GoodsItemQuantity() As String
Get
Return Me._goodsItemQuantity
End Get
Set(value As String)
Me._goodsItemQuantity = Value
End Set
End Property
_
Public Property AuthorizationNumber() As String
Get
Return Me._authorizationNumber
End Get
Set(value As String)
Me._authorizationNumber = Value
End Set
End Property
Public Property CustomsAuthorization() As DEXPDDHeaderCustomsAuthorization
Get
Return Me._customsAuthorization
End Get
Set(value As DEXPDDHeaderCustomsAuthorization)
Me._customsAuthorization = Value
End Set
End Property
Public Property InlandTransportMeans() As DEXPDDHeaderInlandTransportMeans
Get
Return Me._inlandTransportMeans
End Get
Set(value As DEXPDDHeaderInlandTransportMeans)
Me._inlandTransportMeans = Value
End Set
End Property
Public Property DepartureTransportMeans() As DEXPDDHeaderDepartureTransportMeans
Get
Return Me._departureTransportMeans
End Get
Set(value As DEXPDDHeaderDepartureTransportMeans)
Me._departureTransportMeans = Value
End Set
End Property
Public Property BorderTransportMeans() As DEXPDDHeaderBorderTransportMeans
Get
Return Me._borderTransportMeans
End Get
Set(value As DEXPDDHeaderBorderTransportMeans)
Me._borderTransportMeans = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDHeader))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDHeader object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDHeader object
'''
''' string workflow markup to deserialize
''' Output DEXPDDHeader 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 DEXPDDHeader, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeader)
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 DEXPDDHeader) 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 DEXPDDHeader
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDHeader)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDHeader
Return CType(Serializer.Deserialize(s), DEXPDDHeader)
End Function
#End Region
'''
''' Serializes current DEXPDDHeader 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDHeader object
'''
''' string xml file to load and deserialize
''' Output DEXPDDHeader 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 DEXPDDHeader, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeader)
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 DEXPDDHeader) 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 DEXPDDHeader
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDHeaderDeclaration
#Region "Private fields"
Private _type As String
Private _procedure As String
Private _variant As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Type() As String
Get
Return Me._type
End Get
Set(value As String)
Me._type = Value
End Set
End Property
_
Public Property Procedure() As String
Get
Return Me._procedure
End Get
Set(value As String)
Me._procedure = Value
End Set
End Property
_
Public Property [Variant]() As String
Get
Return Me._variant
End Get
Set(value As String)
Me._variant = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDHeaderDeclaration))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDHeaderDeclaration object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDHeaderDeclaration object
'''
''' string workflow markup to deserialize
''' Output DEXPDDHeaderDeclaration 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 DEXPDDHeaderDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderDeclaration)
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 DEXPDDHeaderDeclaration) 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 DEXPDDHeaderDeclaration
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDHeaderDeclaration)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDHeaderDeclaration
Return CType(Serializer.Deserialize(s), DEXPDDHeaderDeclaration)
End Function
#End Region
'''
''' Serializes current DEXPDDHeaderDeclaration 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDHeaderDeclaration object
'''
''' string xml file to load and deserialize
''' Output DEXPDDHeaderDeclaration 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 DEXPDDHeaderDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderDeclaration)
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 DEXPDDHeaderDeclaration) 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 DEXPDDHeaderDeclaration
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDHeaderPartyConstellation
'''
_
Item0000
'''
_
Item0001
'''
_
Item0003
'''
_
Item0010
'''
_
Item0011
'''
_
Item0013
'''
_
Item0100
'''
_
Item0101
'''
_
Item0103
'''
_
Item0110
'''
_
Item0111
'''
_
Item0113
'''
_
Item1000
'''
_
Item1001
'''
_
Item1002
'''
_
Item1003
'''
_
Item1010
'''
_
Item1011
'''
_
Item1012
'''
_
Item1013
'''
_
Item1100
'''
_
Item1101
'''
_
Item1102
'''
_
Item1103
'''
_
Item1110
'''
_
Item1111
'''
_
Item1112
'''
_
Item1113
End Enum
_
Public Enum DEXPDDHeaderContainerFlag
'''
_
Item0
'''
_
Item1
End Enum
_
Partial Public Class DEXPDDHeaderCustomsAuthorization
#Region "Private fields"
Private _localClearanceOutwardProcessing As String
Private _outwardProcessing As String
Private _trustedExporter As String
Private _accreditedExporter As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property LocalClearanceOutwardProcessing() As String
Get
Return Me._localClearanceOutwardProcessing
End Get
Set(value As String)
Me._localClearanceOutwardProcessing = Value
End Set
End Property
_
Public Property OutwardProcessing() As String
Get
Return Me._outwardProcessing
End Get
Set(value As String)
Me._outwardProcessing = Value
End Set
End Property
_
Public Property TrustedExporter() As String
Get
Return Me._trustedExporter
End Get
Set(value As String)
Me._trustedExporter = Value
End Set
End Property
_
Public Property AccreditedExporter() As String
Get
Return Me._accreditedExporter
End Get
Set(value As String)
Me._accreditedExporter = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDHeaderCustomsAuthorization))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDHeaderCustomsAuthorization object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDHeaderCustomsAuthorization object
'''
''' string workflow markup to deserialize
''' Output DEXPDDHeaderCustomsAuthorization 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 DEXPDDHeaderCustomsAuthorization, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderCustomsAuthorization)
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 DEXPDDHeaderCustomsAuthorization) 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 DEXPDDHeaderCustomsAuthorization
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDHeaderCustomsAuthorization)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDHeaderCustomsAuthorization
Return CType(Serializer.Deserialize(s), DEXPDDHeaderCustomsAuthorization)
End Function
#End Region
'''
''' Serializes current DEXPDDHeaderCustomsAuthorization 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDHeaderCustomsAuthorization object
'''
''' string xml file to load and deserialize
''' Output DEXPDDHeaderCustomsAuthorization 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 DEXPDDHeaderCustomsAuthorization, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderCustomsAuthorization)
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 DEXPDDHeaderCustomsAuthorization) 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 DEXPDDHeaderCustomsAuthorization
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDHeaderInlandTransportMeans
#Region "Private fields"
Private _mode As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Mode() As String
Get
Return Me._mode
End Get
Set(value As String)
Me._mode = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDHeaderInlandTransportMeans))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDHeaderInlandTransportMeans object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDHeaderInlandTransportMeans object
'''
''' string workflow markup to deserialize
''' Output DEXPDDHeaderInlandTransportMeans 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 DEXPDDHeaderInlandTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderInlandTransportMeans)
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 DEXPDDHeaderInlandTransportMeans) 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 DEXPDDHeaderInlandTransportMeans
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDHeaderInlandTransportMeans)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDHeaderInlandTransportMeans
Return CType(Serializer.Deserialize(s), DEXPDDHeaderInlandTransportMeans)
End Function
#End Region
'''
''' Serializes current DEXPDDHeaderInlandTransportMeans 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDHeaderInlandTransportMeans object
'''
''' string xml file to load and deserialize
''' Output DEXPDDHeaderInlandTransportMeans 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 DEXPDDHeaderInlandTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderInlandTransportMeans)
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 DEXPDDHeaderInlandTransportMeans) 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 DEXPDDHeaderInlandTransportMeans
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDHeaderDepartureTransportMeans
#Region "Private fields"
Private _type As DEXPDDHeaderDepartureTransportMeansType
Private _identity As String
Private _nationality As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Type() As DEXPDDHeaderDepartureTransportMeansType
Get
Return Me._type
End Get
Set(value As DEXPDDHeaderDepartureTransportMeansType)
Me._type = Value
End Set
End Property
_
Public Property Identity() As String
Get
Return Me._identity
End Get
Set(value As String)
Me._identity = Value
End Set
End Property
_
Public Property Nationality() As String
Get
Return Me._nationality
End Get
Set(value As String)
Me._nationality = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDHeaderDepartureTransportMeans))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDHeaderDepartureTransportMeans object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDHeaderDepartureTransportMeans object
'''
''' string workflow markup to deserialize
''' Output DEXPDDHeaderDepartureTransportMeans 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 DEXPDDHeaderDepartureTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderDepartureTransportMeans)
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 DEXPDDHeaderDepartureTransportMeans) 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 DEXPDDHeaderDepartureTransportMeans
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDHeaderDepartureTransportMeans)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDHeaderDepartureTransportMeans
Return CType(Serializer.Deserialize(s), DEXPDDHeaderDepartureTransportMeans)
End Function
#End Region
'''
''' Serializes current DEXPDDHeaderDepartureTransportMeans 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDHeaderDepartureTransportMeans object
'''
''' string xml file to load and deserialize
''' Output DEXPDDHeaderDepartureTransportMeans 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 DEXPDDHeaderDepartureTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderDepartureTransportMeans)
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 DEXPDDHeaderDepartureTransportMeans) 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 DEXPDDHeaderDepartureTransportMeans
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDHeaderDepartureTransportMeansType
'''
_
Item10
'''
_
Item20
'''
_
Item31
'''
_
Item32
'''
_
Item33
'''
_
Item34
'''
_
Item35
'''
_
Item40
'''
_
Item50
'''
_
Item60
'''
_
Item70
End Enum
_
Partial Public Class DEXPDDHeaderBorderTransportMeans
#Region "Private fields"
Private _mode As String
Private _type As DEXPDDHeaderBorderTransportMeansType
Private _identity As String
Private _nationality As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Mode() As String
Get
Return Me._mode
End Get
Set(value As String)
Me._mode = Value
End Set
End Property
Public Property Type() As DEXPDDHeaderBorderTransportMeansType
Get
Return Me._type
End Get
Set(value As DEXPDDHeaderBorderTransportMeansType)
Me._type = Value
End Set
End Property
_
Public Property Identity() As String
Get
Return Me._identity
End Get
Set(value As String)
Me._identity = Value
End Set
End Property
_
Public Property Nationality() As String
Get
Return Me._nationality
End Get
Set(value As String)
Me._nationality = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDHeaderBorderTransportMeans))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDHeaderBorderTransportMeans object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDHeaderBorderTransportMeans object
'''
''' string workflow markup to deserialize
''' Output DEXPDDHeaderBorderTransportMeans 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 DEXPDDHeaderBorderTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderBorderTransportMeans)
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 DEXPDDHeaderBorderTransportMeans) 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 DEXPDDHeaderBorderTransportMeans
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDHeaderBorderTransportMeans)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDHeaderBorderTransportMeans
Return CType(Serializer.Deserialize(s), DEXPDDHeaderBorderTransportMeans)
End Function
#End Region
'''
''' Serializes current DEXPDDHeaderBorderTransportMeans 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDHeaderBorderTransportMeans object
'''
''' string xml file to load and deserialize
''' Output DEXPDDHeaderBorderTransportMeans 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 DEXPDDHeaderBorderTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDHeaderBorderTransportMeans)
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 DEXPDDHeaderBorderTransportMeans) 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 DEXPDDHeaderBorderTransportMeans
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDHeaderBorderTransportMeansType
'''
_
Item10
'''
_
Item20
'''
_
Item31
'''
_
Item32
'''
_
Item33
'''
_
Item34
'''
_
Item35
'''
_
Item40
'''
_
Item50
'''
_
Item60
'''
_
Item70
End Enum
_
Partial Public Class DEXPDDGoodsLoadingPlace
#Region "Private fields"
Private _identification As DEXPDDGoodsLoadingPlaceIdentification
Private _address As DEXPDDGoodsLoadingPlaceAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._address = New DEXPDDGoodsLoadingPlaceAddress()
Me._identification = New DEXPDDGoodsLoadingPlaceIdentification()
End Sub
Public Property Identification() As DEXPDDGoodsLoadingPlaceIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDGoodsLoadingPlaceIdentification)
Me._identification = Value
End Set
End Property
Public Property Address() As DEXPDDGoodsLoadingPlaceAddress
Get
Return Me._address
End Get
Set(value As DEXPDDGoodsLoadingPlaceAddress)
Me._address = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDGoodsLoadingPlace))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDGoodsLoadingPlace object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDGoodsLoadingPlace object
'''
''' string workflow markup to deserialize
''' Output DEXPDDGoodsLoadingPlace 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 DEXPDDGoodsLoadingPlace, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDGoodsLoadingPlace)
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 DEXPDDGoodsLoadingPlace) 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 DEXPDDGoodsLoadingPlace
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDGoodsLoadingPlace)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDGoodsLoadingPlace
Return CType(Serializer.Deserialize(s), DEXPDDGoodsLoadingPlace)
End Function
#End Region
'''
''' Serializes current DEXPDDGoodsLoadingPlace 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDGoodsLoadingPlace object
'''
''' string xml file to load and deserialize
''' Output DEXPDDGoodsLoadingPlace 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 DEXPDDGoodsLoadingPlace, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDGoodsLoadingPlace)
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 DEXPDDGoodsLoadingPlace) 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 DEXPDDGoodsLoadingPlace
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDGoodsLoadingPlaceIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDGoodsLoadingPlaceIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDGoodsLoadingPlaceIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDGoodsLoadingPlaceIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDGoodsLoadingPlaceIdentification 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 DEXPDDGoodsLoadingPlaceIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDGoodsLoadingPlaceIdentification)
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 DEXPDDGoodsLoadingPlaceIdentification) 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 DEXPDDGoodsLoadingPlaceIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDGoodsLoadingPlaceIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDGoodsLoadingPlaceIdentification
Return CType(Serializer.Deserialize(s), DEXPDDGoodsLoadingPlaceIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDGoodsLoadingPlaceIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDGoodsLoadingPlaceIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDGoodsLoadingPlaceIdentification 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 DEXPDDGoodsLoadingPlaceIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDGoodsLoadingPlaceIdentification)
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 DEXPDDGoodsLoadingPlaceIdentification) 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 DEXPDDGoodsLoadingPlaceIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDGoodsLoadingPlaceAddress
#Region "Private fields"
Private _line As String
Private _postcode As String
Private _city As String
Private _complement As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Line() As String
Get
Return Me._line
End Get
Set(value As String)
Me._line = Value
End Set
End Property
_
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set(value As String)
Me._postcode = Value
End Set
End Property
_
Public Property City() As String
Get
Return Me._city
End Get
Set(value As String)
Me._city = Value
End Set
End Property
_
Public Property Complement() As String
Get
Return Me._complement
End Get
Set(value As String)
Me._complement = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDGoodsLoadingPlaceAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDGoodsLoadingPlaceAddress object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDGoodsLoadingPlaceAddress object
'''
''' string workflow markup to deserialize
''' Output DEXPDDGoodsLoadingPlaceAddress 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 DEXPDDGoodsLoadingPlaceAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDGoodsLoadingPlaceAddress)
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 DEXPDDGoodsLoadingPlaceAddress) 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 DEXPDDGoodsLoadingPlaceAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDGoodsLoadingPlaceAddress)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDGoodsLoadingPlaceAddress
Return CType(Serializer.Deserialize(s), DEXPDDGoodsLoadingPlaceAddress)
End Function
#End Region
'''
''' Serializes current DEXPDDGoodsLoadingPlaceAddress 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDGoodsLoadingPlaceAddress object
'''
''' string xml file to load and deserialize
''' Output DEXPDDGoodsLoadingPlaceAddress 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 DEXPDDGoodsLoadingPlaceAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDGoodsLoadingPlaceAddress)
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 DEXPDDGoodsLoadingPlaceAddress) 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 DEXPDDGoodsLoadingPlaceAddress
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDExportCustomsOffice
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDExportCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDExportCustomsOffice object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDExportCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output DEXPDDExportCustomsOffice 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 DEXPDDExportCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExportCustomsOffice)
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 DEXPDDExportCustomsOffice) 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 DEXPDDExportCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDExportCustomsOffice)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDExportCustomsOffice
Return CType(Serializer.Deserialize(s), DEXPDDExportCustomsOffice)
End Function
#End Region
'''
''' Serializes current DEXPDDExportCustomsOffice 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDExportCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output DEXPDDExportCustomsOffice 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 DEXPDDExportCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExportCustomsOffice)
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 DEXPDDExportCustomsOffice) 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 DEXPDDExportCustomsOffice
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDSupplementaryDeclarationCustomsOffice
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDSupplementaryDeclarationCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDSupplementaryDeclarationCustomsOffice object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDSupplementaryDeclarationCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output DEXPDDSupplementaryDeclarationCustomsOffice 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 DEXPDDSupplementaryDeclarationCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSupplementaryDeclarationCustomsOffice)
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 DEXPDDSupplementaryDeclarationCustomsOffice) 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 DEXPDDSupplementaryDeclarationCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDSupplementaryDeclarationCustomsOffice)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDSupplementaryDeclarationCustomsOffice
Return CType(Serializer.Deserialize(s), DEXPDDSupplementaryDeclarationCustomsOffice)
End Function
#End Region
'''
''' Serializes current DEXPDDSupplementaryDeclarationCustomsOffice 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDSupplementaryDeclarationCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output DEXPDDSupplementaryDeclarationCustomsOffice 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 DEXPDDSupplementaryDeclarationCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSupplementaryDeclarationCustomsOffice)
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 DEXPDDSupplementaryDeclarationCustomsOffice) 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 DEXPDDSupplementaryDeclarationCustomsOffice
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDIntendedExitCustomsOffice
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDIntendedExitCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDIntendedExitCustomsOffice object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDIntendedExitCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output DEXPDDIntendedExitCustomsOffice 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 DEXPDDIntendedExitCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDIntendedExitCustomsOffice)
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 DEXPDDIntendedExitCustomsOffice) 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 DEXPDDIntendedExitCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDIntendedExitCustomsOffice)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDIntendedExitCustomsOffice
Return CType(Serializer.Deserialize(s), DEXPDDIntendedExitCustomsOffice)
End Function
#End Region
'''
''' Serializes current DEXPDDIntendedExitCustomsOffice 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDIntendedExitCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output DEXPDDIntendedExitCustomsOffice 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 DEXPDDIntendedExitCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDIntendedExitCustomsOffice)
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 DEXPDDIntendedExitCustomsOffice) 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 DEXPDDIntendedExitCustomsOffice
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDActualExitCustomsOffice
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDActualExitCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDActualExitCustomsOffice object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDActualExitCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output DEXPDDActualExitCustomsOffice 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 DEXPDDActualExitCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDActualExitCustomsOffice)
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 DEXPDDActualExitCustomsOffice) 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 DEXPDDActualExitCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDActualExitCustomsOffice)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDActualExitCustomsOffice
Return CType(Serializer.Deserialize(s), DEXPDDActualExitCustomsOffice)
End Function
#End Region
'''
''' Serializes current DEXPDDActualExitCustomsOffice 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDActualExitCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output DEXPDDActualExitCustomsOffice 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 DEXPDDActualExitCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDActualExitCustomsOffice)
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 DEXPDDActualExitCustomsOffice) 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 DEXPDDActualExitCustomsOffice
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDTransaction
#Region "Private fields"
Private _type As DEXPDDTransactionType
Private _invoiceAmount As Decimal
Private _currency As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Type() As DEXPDDTransactionType
Get
Return Me._type
End Get
Set(value As DEXPDDTransactionType)
Me._type = Value
End Set
End Property
Public Property InvoiceAmount() As Decimal
Get
Return Me._invoiceAmount
End Get
Set(value As Decimal)
Me._invoiceAmount = Value
End Set
End Property
_
Public Property Currency() As String
Get
Return Me._currency
End Get
Set(value As String)
Me._currency = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDTransaction))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDTransaction object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDTransaction object
'''
''' string workflow markup to deserialize
''' Output DEXPDDTransaction 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 DEXPDDTransaction, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDTransaction)
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 DEXPDDTransaction) 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 DEXPDDTransaction
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDTransaction)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDTransaction
Return CType(Serializer.Deserialize(s), DEXPDDTransaction)
End Function
#End Region
'''
''' Serializes current DEXPDDTransaction 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDTransaction object
'''
''' string xml file to load and deserialize
''' Output DEXPDDTransaction 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 DEXPDDTransaction, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDTransaction)
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 DEXPDDTransaction) 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 DEXPDDTransaction
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDTransactionType
'''
_
Item11
'''
_
Item12
'''
_
Item13
'''
_
Item14
'''
_
Item19
'''
_
Item21
'''
_
Item22
'''
_
Item23
'''
_
Item29
'''
_
Item31
'''
_
Item32
'''
_
Item33
'''
_
Item34
'''
_
Item41
'''
_
Item42
'''
_
Item51
'''
_
Item52
'''
_
Item67
'''
_
Item69
'''
_
Item71
'''
_
Item72
'''
_
Item81
'''
_
Item91
'''
_
Item92
'''
_
Item99
End Enum
_
Partial Public Class DEXPDDSpecialFact
#Region "Private fields"
Private _indicator As DEXPDDSpecialFactIndicator
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Indicator() As DEXPDDSpecialFactIndicator
Get
Return Me._indicator
End Get
Set(value As DEXPDDSpecialFactIndicator)
Me._indicator = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDSpecialFact))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDSpecialFact object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDSpecialFact object
'''
''' string workflow markup to deserialize
''' Output DEXPDDSpecialFact 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 DEXPDDSpecialFact, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSpecialFact)
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 DEXPDDSpecialFact) 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 DEXPDDSpecialFact
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDSpecialFact)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDSpecialFact
Return CType(Serializer.Deserialize(s), DEXPDDSpecialFact)
End Function
#End Region
'''
''' Serializes current DEXPDDSpecialFact 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDSpecialFact object
'''
''' string xml file to load and deserialize
''' Output DEXPDDSpecialFact 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 DEXPDDSpecialFact, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSpecialFact)
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 DEXPDDSpecialFact) 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 DEXPDDSpecialFact
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDSpecialFactIndicator
'''
_
Item0
'''
_
Item1
'''
_
Item2
'''
_
Item3
'''
_
Item4
'''
_
Item5
End Enum
_
Partial Public Class DEXPDDItinerary
#Region "Private fields"
Private _country As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Country() As String
Get
Return Me._country
End Get
Set(value As String)
Me._country = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDItinerary))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDItinerary object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDItinerary object
'''
''' string workflow markup to deserialize
''' Output DEXPDDItinerary 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 DEXPDDItinerary, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDItinerary)
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 DEXPDDItinerary) 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 DEXPDDItinerary
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDItinerary)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDItinerary
Return CType(Serializer.Deserialize(s), DEXPDDItinerary)
End Function
#End Region
'''
''' Serializes current DEXPDDItinerary 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDItinerary object
'''
''' string xml file to load and deserialize
''' Output DEXPDDItinerary 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 DEXPDDItinerary, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDItinerary)
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 DEXPDDItinerary) 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 DEXPDDItinerary
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDSeals
#Region "Private fields"
Private _type As DEXPDDSealsType
Private _number As String
Private _seal As List(Of DEXPDDSealsSeal)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._seal = New List(Of DEXPDDSealsSeal)()
End Sub
Public Property Type() As DEXPDDSealsType
Get
Return Me._type
End Get
Set(value As DEXPDDSealsType)
Me._type = Value
End Set
End Property
_
Public Property Number() As String
Get
Return Me._number
End Get
Set(value As String)
Me._number = Value
End Set
End Property
_
Public Property Seal() As List(Of DEXPDDSealsSeal)
Get
Return Me._seal
End Get
Set(value As List(Of DEXPDDSealsSeal))
Me._seal = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDSeals))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDSeals object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDSeals object
'''
''' string workflow markup to deserialize
''' Output DEXPDDSeals 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 DEXPDDSeals, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSeals)
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 DEXPDDSeals) 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 DEXPDDSeals
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDSeals)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDSeals
Return CType(Serializer.Deserialize(s), DEXPDDSeals)
End Function
#End Region
'''
''' Serializes current DEXPDDSeals 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDSeals object
'''
''' string xml file to load and deserialize
''' Output DEXPDDSeals 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 DEXPDDSeals, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSeals)
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 DEXPDDSeals) 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 DEXPDDSeals
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDSealsType
'''
P
'''
R
End Enum
_
Partial Public Class DEXPDDSealsSeal
#Region "Private fields"
Private _identity As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Identity() As String
Get
Return Me._identity
End Get
Set(value As String)
Me._identity = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDSealsSeal))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDSealsSeal object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDSealsSeal object
'''
''' string workflow markup to deserialize
''' Output DEXPDDSealsSeal 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 DEXPDDSealsSeal, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSealsSeal)
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 DEXPDDSealsSeal) 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 DEXPDDSealsSeal
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDSealsSeal)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDSealsSeal
Return CType(Serializer.Deserialize(s), DEXPDDSealsSeal)
End Function
#End Region
'''
''' Serializes current DEXPDDSealsSeal 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDSealsSeal object
'''
''' string xml file to load and deserialize
''' Output DEXPDDSealsSeal 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 DEXPDDSealsSeal, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDSealsSeal)
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 DEXPDDSealsSeal) 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 DEXPDDSealsSeal
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDPresentationPackingLoading
#Region "Private fields"
Private _startDateTime As Date
Private _endDateTime As Date
Private Shared sSerializer As XmlSerializer
#End Region
Public Property StartDateTime() As Date
Get
Return Me._startDateTime
End Get
Set(value As Date)
Me._startDateTime = Value
End Set
End Property
Public Property EndDateTime() As Date
Get
Return Me._endDateTime
End Get
Set(value As Date)
Me._endDateTime = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDPresentationPackingLoading))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDPresentationPackingLoading object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDPresentationPackingLoading object
'''
''' string workflow markup to deserialize
''' Output DEXPDDPresentationPackingLoading 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 DEXPDDPresentationPackingLoading, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDPresentationPackingLoading)
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 DEXPDDPresentationPackingLoading) 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 DEXPDDPresentationPackingLoading
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDPresentationPackingLoading)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDPresentationPackingLoading
Return CType(Serializer.Deserialize(s), DEXPDDPresentationPackingLoading)
End Function
#End Region
'''
''' Serializes current DEXPDDPresentationPackingLoading 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDPresentationPackingLoading object
'''
''' string xml file to load and deserialize
''' Output DEXPDDPresentationPackingLoading 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 DEXPDDPresentationPackingLoading, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDPresentationPackingLoading)
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 DEXPDDPresentationPackingLoading) 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 DEXPDDPresentationPackingLoading
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDExporter
#Region "Private fields"
Private _class As DEXPDDExporterClass
Private _identification As DEXPDDExporterIdentification
Private _name As String
Private _address As DEXPDDExporterAddress
Private _contactPerson As DEXPDDExporterContactPerson
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._contactPerson = New DEXPDDExporterContactPerson()
Me._address = New DEXPDDExporterAddress()
Me._identification = New DEXPDDExporterIdentification()
End Sub
Public Property [Class]() As DEXPDDExporterClass
Get
Return Me._class
End Get
Set(value As DEXPDDExporterClass)
Me._class = Value
End Set
End Property
Public Property Identification() As DEXPDDExporterIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDExporterIdentification)
Me._identification = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
Public Property Address() As DEXPDDExporterAddress
Get
Return Me._address
End Get
Set(value As DEXPDDExporterAddress)
Me._address = Value
End Set
End Property
Public Property ContactPerson() As DEXPDDExporterContactPerson
Get
Return Me._contactPerson
End Get
Set(value As DEXPDDExporterContactPerson)
Me._contactPerson = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDExporter))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDExporter object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDExporter object
'''
''' string workflow markup to deserialize
''' Output DEXPDDExporter 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 DEXPDDExporter, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporter)
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 DEXPDDExporter) 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 DEXPDDExporter
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDExporter)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDExporter
Return CType(Serializer.Deserialize(s), DEXPDDExporter)
End Function
#End Region
'''
''' Serializes current DEXPDDExporter 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDExporter object
'''
''' string xml file to load and deserialize
''' Output DEXPDDExporter 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 DEXPDDExporter, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporter)
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 DEXPDDExporter) 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 DEXPDDExporter
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDExporterClass
'''
_
Item0
'''
_
Item2
'''
_
Item4
End Enum
_
Partial Public Class DEXPDDExporterIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
_
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set(value As String)
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDExporterIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDExporterIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDExporterIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDExporterIdentification 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 DEXPDDExporterIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporterIdentification)
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 DEXPDDExporterIdentification) 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 DEXPDDExporterIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDExporterIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDExporterIdentification
Return CType(Serializer.Deserialize(s), DEXPDDExporterIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDExporterIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDExporterIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDExporterIdentification 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 DEXPDDExporterIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporterIdentification)
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 DEXPDDExporterIdentification) 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 DEXPDDExporterIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDExporterAddress
#Region "Private fields"
Private _line As String
Private _city As String
Private _postcode As String
Private _country As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Line() As String
Get
Return Me._line
End Get
Set(value As String)
Me._line = Value
End Set
End Property
_
Public Property City() As String
Get
Return Me._city
End Get
Set(value As String)
Me._city = Value
End Set
End Property
_
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set(value As String)
Me._postcode = Value
End Set
End Property
_
Public Property Country() As String
Get
Return Me._country
End Get
Set(value As String)
Me._country = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDExporterAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDExporterAddress object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDExporterAddress object
'''
''' string workflow markup to deserialize
''' Output DEXPDDExporterAddress 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 DEXPDDExporterAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporterAddress)
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 DEXPDDExporterAddress) 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 DEXPDDExporterAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDExporterAddress)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDExporterAddress
Return CType(Serializer.Deserialize(s), DEXPDDExporterAddress)
End Function
#End Region
'''
''' Serializes current DEXPDDExporterAddress 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDExporterAddress object
'''
''' string xml file to load and deserialize
''' Output DEXPDDExporterAddress 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 DEXPDDExporterAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporterAddress)
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 DEXPDDExporterAddress) 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 DEXPDDExporterAddress
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDExporterContactPerson
#Region "Private fields"
Private _position As String
Private _name As String
Private _phoneNumber As String
Private _facsimileNumber As String
Private _mailAddress As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Position() As String
Get
Return Me._position
End Get
Set(value As String)
Me._position = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
_
Public Property PhoneNumber() As String
Get
Return Me._phoneNumber
End Get
Set(value As String)
Me._phoneNumber = Value
End Set
End Property
_
Public Property FacsimileNumber() As String
Get
Return Me._facsimileNumber
End Get
Set(value As String)
Me._facsimileNumber = Value
End Set
End Property
_
Public Property MailAddress() As String
Get
Return Me._mailAddress
End Get
Set(value As String)
Me._mailAddress = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDExporterContactPerson))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDExporterContactPerson object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDExporterContactPerson object
'''
''' string workflow markup to deserialize
''' Output DEXPDDExporterContactPerson 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 DEXPDDExporterContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporterContactPerson)
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 DEXPDDExporterContactPerson) 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 DEXPDDExporterContactPerson
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDExporterContactPerson)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDExporterContactPerson
Return CType(Serializer.Deserialize(s), DEXPDDExporterContactPerson)
End Function
#End Region
'''
''' Serializes current DEXPDDExporterContactPerson 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDExporterContactPerson object
'''
''' string xml file to load and deserialize
''' Output DEXPDDExporterContactPerson 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 DEXPDDExporterContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDExporterContactPerson)
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 DEXPDDExporterContactPerson) 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 DEXPDDExporterContactPerson
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDDeclarant
#Region "Private fields"
Private _class As DEXPDDDeclarantClass
Private _identification As DEXPDDDeclarantIdentification
Private _name As String
Private _address As DEXPDDDeclarantAddress
Private _contactPerson As DEXPDDDeclarantContactPerson
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._contactPerson = New DEXPDDDeclarantContactPerson()
Me._address = New DEXPDDDeclarantAddress()
Me._identification = New DEXPDDDeclarantIdentification()
End Sub
Public Property [Class]() As DEXPDDDeclarantClass
Get
Return Me._class
End Get
Set(value As DEXPDDDeclarantClass)
Me._class = Value
End Set
End Property
Public Property Identification() As DEXPDDDeclarantIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDDeclarantIdentification)
Me._identification = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
Public Property Address() As DEXPDDDeclarantAddress
Get
Return Me._address
End Get
Set(value As DEXPDDDeclarantAddress)
Me._address = Value
End Set
End Property
Public Property ContactPerson() As DEXPDDDeclarantContactPerson
Get
Return Me._contactPerson
End Get
Set(value As DEXPDDDeclarantContactPerson)
Me._contactPerson = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDDeclarant))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDDeclarant object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDDeclarant object
'''
''' string workflow markup to deserialize
''' Output DEXPDDDeclarant 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 DEXPDDDeclarant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarant)
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 DEXPDDDeclarant) 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 DEXPDDDeclarant
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDDeclarant)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDDeclarant
Return CType(Serializer.Deserialize(s), DEXPDDDeclarant)
End Function
#End Region
'''
''' Serializes current DEXPDDDeclarant 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDDeclarant object
'''
''' string xml file to load and deserialize
''' Output DEXPDDDeclarant 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 DEXPDDDeclarant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarant)
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 DEXPDDDeclarant) 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 DEXPDDDeclarant
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDDeclarantClass
'''
_
Item0
'''
_
Item2
End Enum
_
Partial Public Class DEXPDDDeclarantIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
_
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set(value As String)
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDDeclarantIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDDeclarantIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDDeclarantIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDDeclarantIdentification 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 DEXPDDDeclarantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarantIdentification)
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 DEXPDDDeclarantIdentification) 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 DEXPDDDeclarantIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDDeclarantIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDDeclarantIdentification
Return CType(Serializer.Deserialize(s), DEXPDDDeclarantIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDDeclarantIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDDeclarantIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDDeclarantIdentification 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 DEXPDDDeclarantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarantIdentification)
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 DEXPDDDeclarantIdentification) 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 DEXPDDDeclarantIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDDeclarantAddress
#Region "Private fields"
Private _line As String
Private _city As String
Private _postcode As String
Private _country As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Line() As String
Get
Return Me._line
End Get
Set(value As String)
Me._line = Value
End Set
End Property
_
Public Property City() As String
Get
Return Me._city
End Get
Set(value As String)
Me._city = Value
End Set
End Property
_
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set(value As String)
Me._postcode = Value
End Set
End Property
_
Public Property Country() As String
Get
Return Me._country
End Get
Set(value As String)
Me._country = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDDeclarantAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDDeclarantAddress object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDDeclarantAddress object
'''
''' string workflow markup to deserialize
''' Output DEXPDDDeclarantAddress 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 DEXPDDDeclarantAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarantAddress)
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 DEXPDDDeclarantAddress) 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 DEXPDDDeclarantAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDDeclarantAddress)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDDeclarantAddress
Return CType(Serializer.Deserialize(s), DEXPDDDeclarantAddress)
End Function
#End Region
'''
''' Serializes current DEXPDDDeclarantAddress 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDDeclarantAddress object
'''
''' string xml file to load and deserialize
''' Output DEXPDDDeclarantAddress 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 DEXPDDDeclarantAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarantAddress)
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 DEXPDDDeclarantAddress) 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 DEXPDDDeclarantAddress
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDDeclarantContactPerson
#Region "Private fields"
Private _position As String
Private _name As String
Private _phoneNumber As String
Private _facsimileNumber As String
Private _mailAddress As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Position() As String
Get
Return Me._position
End Get
Set(value As String)
Me._position = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
_
Public Property PhoneNumber() As String
Get
Return Me._phoneNumber
End Get
Set(value As String)
Me._phoneNumber = Value
End Set
End Property
_
Public Property FacsimileNumber() As String
Get
Return Me._facsimileNumber
End Get
Set(value As String)
Me._facsimileNumber = Value
End Set
End Property
_
Public Property MailAddress() As String
Get
Return Me._mailAddress
End Get
Set(value As String)
Me._mailAddress = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDDeclarantContactPerson))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDDeclarantContactPerson object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDDeclarantContactPerson object
'''
''' string workflow markup to deserialize
''' Output DEXPDDDeclarantContactPerson 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 DEXPDDDeclarantContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarantContactPerson)
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 DEXPDDDeclarantContactPerson) 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 DEXPDDDeclarantContactPerson
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDDeclarantContactPerson)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDDeclarantContactPerson
Return CType(Serializer.Deserialize(s), DEXPDDDeclarantContactPerson)
End Function
#End Region
'''
''' Serializes current DEXPDDDeclarantContactPerson 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDDeclarantContactPerson object
'''
''' string xml file to load and deserialize
''' Output DEXPDDDeclarantContactPerson 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 DEXPDDDeclarantContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDDeclarantContactPerson)
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 DEXPDDDeclarantContactPerson) 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 DEXPDDDeclarantContactPerson
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDRepresentative
#Region "Private fields"
Private _class As DEXPDDRepresentativeClass
Private _identification As DEXPDDRepresentativeIdentification
Private _name As String
Private _address As DEXPDDRepresentativeAddress
Private _contactPerson As DEXPDDRepresentativeContactPerson
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._contactPerson = New DEXPDDRepresentativeContactPerson()
Me._address = New DEXPDDRepresentativeAddress()
Me._identification = New DEXPDDRepresentativeIdentification()
End Sub
Public Property [Class]() As DEXPDDRepresentativeClass
Get
Return Me._class
End Get
Set(value As DEXPDDRepresentativeClass)
Me._class = Value
End Set
End Property
Public Property Identification() As DEXPDDRepresentativeIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDRepresentativeIdentification)
Me._identification = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
Public Property Address() As DEXPDDRepresentativeAddress
Get
Return Me._address
End Get
Set(value As DEXPDDRepresentativeAddress)
Me._address = Value
End Set
End Property
Public Property ContactPerson() As DEXPDDRepresentativeContactPerson
Get
Return Me._contactPerson
End Get
Set(value As DEXPDDRepresentativeContactPerson)
Me._contactPerson = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDRepresentative))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDRepresentative object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDRepresentative object
'''
''' string workflow markup to deserialize
''' Output DEXPDDRepresentative 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 DEXPDDRepresentative, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentative)
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 DEXPDDRepresentative) 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 DEXPDDRepresentative
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDRepresentative)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDRepresentative
Return CType(Serializer.Deserialize(s), DEXPDDRepresentative)
End Function
#End Region
'''
''' Serializes current DEXPDDRepresentative 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDRepresentative object
'''
''' string xml file to load and deserialize
''' Output DEXPDDRepresentative 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 DEXPDDRepresentative, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentative)
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 DEXPDDRepresentative) 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 DEXPDDRepresentative
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDRepresentativeClass
'''
_
Item0
'''
_
Item2
End Enum
_
Partial Public Class DEXPDDRepresentativeIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
_
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set(value As String)
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDRepresentativeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDRepresentativeIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDRepresentativeIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDRepresentativeIdentification 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 DEXPDDRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentativeIdentification)
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 DEXPDDRepresentativeIdentification) 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 DEXPDDRepresentativeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDRepresentativeIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDRepresentativeIdentification
Return CType(Serializer.Deserialize(s), DEXPDDRepresentativeIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDRepresentativeIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDRepresentativeIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDRepresentativeIdentification 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 DEXPDDRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentativeIdentification)
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 DEXPDDRepresentativeIdentification) 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 DEXPDDRepresentativeIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDRepresentativeAddress
#Region "Private fields"
Private _line As String
Private _city As String
Private _postcode As String
Private _country As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Line() As String
Get
Return Me._line
End Get
Set(value As String)
Me._line = Value
End Set
End Property
_
Public Property City() As String
Get
Return Me._city
End Get
Set(value As String)
Me._city = Value
End Set
End Property
_
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set(value As String)
Me._postcode = Value
End Set
End Property
_
Public Property Country() As String
Get
Return Me._country
End Get
Set(value As String)
Me._country = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDRepresentativeAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDRepresentativeAddress object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDRepresentativeAddress object
'''
''' string workflow markup to deserialize
''' Output DEXPDDRepresentativeAddress 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 DEXPDDRepresentativeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentativeAddress)
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 DEXPDDRepresentativeAddress) 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 DEXPDDRepresentativeAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDRepresentativeAddress)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDRepresentativeAddress
Return CType(Serializer.Deserialize(s), DEXPDDRepresentativeAddress)
End Function
#End Region
'''
''' Serializes current DEXPDDRepresentativeAddress 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDRepresentativeAddress object
'''
''' string xml file to load and deserialize
''' Output DEXPDDRepresentativeAddress 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 DEXPDDRepresentativeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentativeAddress)
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 DEXPDDRepresentativeAddress) 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 DEXPDDRepresentativeAddress
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDRepresentativeContactPerson
#Region "Private fields"
Private _position As String
Private _name As String
Private _phoneNumber As String
Private _facsimileNumber As String
Private _mailAddress As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Position() As String
Get
Return Me._position
End Get
Set(value As String)
Me._position = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
_
Public Property PhoneNumber() As String
Get
Return Me._phoneNumber
End Get
Set(value As String)
Me._phoneNumber = Value
End Set
End Property
_
Public Property FacsimileNumber() As String
Get
Return Me._facsimileNumber
End Get
Set(value As String)
Me._facsimileNumber = Value
End Set
End Property
_
Public Property MailAddress() As String
Get
Return Me._mailAddress
End Get
Set(value As String)
Me._mailAddress = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDRepresentativeContactPerson))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDRepresentativeContactPerson object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDRepresentativeContactPerson object
'''
''' string workflow markup to deserialize
''' Output DEXPDDRepresentativeContactPerson 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 DEXPDDRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentativeContactPerson)
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 DEXPDDRepresentativeContactPerson) 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 DEXPDDRepresentativeContactPerson
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDRepresentativeContactPerson)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDRepresentativeContactPerson
Return CType(Serializer.Deserialize(s), DEXPDDRepresentativeContactPerson)
End Function
#End Region
'''
''' Serializes current DEXPDDRepresentativeContactPerson 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDRepresentativeContactPerson object
'''
''' string xml file to load and deserialize
''' Output DEXPDDRepresentativeContactPerson 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 DEXPDDRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDRepresentativeContactPerson)
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 DEXPDDRepresentativeContactPerson) 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 DEXPDDRepresentativeContactPerson
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDContractor
#Region "Private fields"
Private _class As DEXPDDContractorClass
Private _identification As DEXPDDContractorIdentification
Private _name As String
Private _address As DEXPDDContractorAddress
Private _contactPerson As DEXPDDContractorContactPerson
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._contactPerson = New DEXPDDContractorContactPerson()
Me._address = New DEXPDDContractorAddress()
Me._identification = New DEXPDDContractorIdentification()
End Sub
Public Property [Class]() As DEXPDDContractorClass
Get
Return Me._class
End Get
Set(value As DEXPDDContractorClass)
Me._class = Value
End Set
End Property
Public Property Identification() As DEXPDDContractorIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDContractorIdentification)
Me._identification = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
Public Property Address() As DEXPDDContractorAddress
Get
Return Me._address
End Get
Set(value As DEXPDDContractorAddress)
Me._address = Value
End Set
End Property
Public Property ContactPerson() As DEXPDDContractorContactPerson
Get
Return Me._contactPerson
End Get
Set(value As DEXPDDContractorContactPerson)
Me._contactPerson = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDContractor))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDContractor object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDContractor object
'''
''' string workflow markup to deserialize
''' Output DEXPDDContractor 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 DEXPDDContractor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractor)
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 DEXPDDContractor) 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 DEXPDDContractor
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDContractor)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDContractor
Return CType(Serializer.Deserialize(s), DEXPDDContractor)
End Function
#End Region
'''
''' Serializes current DEXPDDContractor 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDContractor object
'''
''' string xml file to load and deserialize
''' Output DEXPDDContractor 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 DEXPDDContractor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractor)
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 DEXPDDContractor) 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 DEXPDDContractor
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDContractorClass
'''
_
Item0
'''
_
Item2
End Enum
_
Partial Public Class DEXPDDContractorIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
_
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set(value As String)
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDContractorIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDContractorIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDContractorIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDContractorIdentification 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 DEXPDDContractorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractorIdentification)
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 DEXPDDContractorIdentification) 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 DEXPDDContractorIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDContractorIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDContractorIdentification
Return CType(Serializer.Deserialize(s), DEXPDDContractorIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDContractorIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDContractorIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDContractorIdentification 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 DEXPDDContractorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractorIdentification)
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 DEXPDDContractorIdentification) 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 DEXPDDContractorIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDContractorAddress
#Region "Private fields"
Private _line As String
Private _city As String
Private _postcode As String
Private _country As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Line() As String
Get
Return Me._line
End Get
Set(value As String)
Me._line = Value
End Set
End Property
_
Public Property City() As String
Get
Return Me._city
End Get
Set(value As String)
Me._city = Value
End Set
End Property
_
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set(value As String)
Me._postcode = Value
End Set
End Property
_
Public Property Country() As String
Get
Return Me._country
End Get
Set(value As String)
Me._country = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDContractorAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDContractorAddress object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDContractorAddress object
'''
''' string workflow markup to deserialize
''' Output DEXPDDContractorAddress 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 DEXPDDContractorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractorAddress)
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 DEXPDDContractorAddress) 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 DEXPDDContractorAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDContractorAddress)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDContractorAddress
Return CType(Serializer.Deserialize(s), DEXPDDContractorAddress)
End Function
#End Region
'''
''' Serializes current DEXPDDContractorAddress 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDContractorAddress object
'''
''' string xml file to load and deserialize
''' Output DEXPDDContractorAddress 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 DEXPDDContractorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractorAddress)
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 DEXPDDContractorAddress) 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 DEXPDDContractorAddress
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDContractorContactPerson
#Region "Private fields"
Private _position As String
Private _name As String
Private _phoneNumber As String
Private _facsimileNumber As String
Private _mailAddress As String
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property Position() As String
Get
Return Me._position
End Get
Set(value As String)
Me._position = Value
End Set
End Property
_
Public Property Name() As String
Get
Return Me._name
End Get
Set(value As String)
Me._name = Value
End Set
End Property
_
Public Property PhoneNumber() As String
Get
Return Me._phoneNumber
End Get
Set(value As String)
Me._phoneNumber = Value
End Set
End Property
_
Public Property FacsimileNumber() As String
Get
Return Me._facsimileNumber
End Get
Set(value As String)
Me._facsimileNumber = Value
End Set
End Property
_
Public Property MailAddress() As String
Get
Return Me._mailAddress
End Get
Set(value As String)
Me._mailAddress = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDContractorContactPerson))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDContractorContactPerson object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDContractorContactPerson object
'''
''' string workflow markup to deserialize
''' Output DEXPDDContractorContactPerson 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 DEXPDDContractorContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractorContactPerson)
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 DEXPDDContractorContactPerson) 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 DEXPDDContractorContactPerson
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDContractorContactPerson)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDContractorContactPerson
Return CType(Serializer.Deserialize(s), DEXPDDContractorContactPerson)
End Function
#End Region
'''
''' Serializes current DEXPDDContractorContactPerson 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDContractorContactPerson object
'''
''' string xml file to load and deserialize
''' Output DEXPDDContractorContactPerson 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 DEXPDDContractorContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDContractorContactPerson)
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 DEXPDDContractorContactPerson) 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 DEXPDDContractorContactPerson
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDOutwardProcessingOwner
#Region "Private fields"
Private _class As DEXPDDOutwardProcessingOwnerClass
Private _identification As DEXPDDOutwardProcessingOwnerIdentification
Private _contactPerson As DEXPDDOutwardProcessingOwnerContactPerson
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New()
Me._contactPerson = New DEXPDDOutwardProcessingOwnerContactPerson()
Me._identification = New DEXPDDOutwardProcessingOwnerIdentification()
End Sub
Public Property [Class]() As DEXPDDOutwardProcessingOwnerClass
Get
Return Me._class
End Get
Set(value As DEXPDDOutwardProcessingOwnerClass)
Me._class = Value
End Set
End Property
Public Property Identification() As DEXPDDOutwardProcessingOwnerIdentification
Get
Return Me._identification
End Get
Set(value As DEXPDDOutwardProcessingOwnerIdentification)
Me._identification = Value
End Set
End Property
Public Property ContactPerson() As DEXPDDOutwardProcessingOwnerContactPerson
Get
Return Me._contactPerson
End Get
Set(value As DEXPDDOutwardProcessingOwnerContactPerson)
Me._contactPerson = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDOutwardProcessingOwner))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDOutwardProcessingOwner object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDOutwardProcessingOwner object
'''
''' string workflow markup to deserialize
''' Output DEXPDDOutwardProcessingOwner 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 DEXPDDOutwardProcessingOwner, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDOutwardProcessingOwner)
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 DEXPDDOutwardProcessingOwner) 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 DEXPDDOutwardProcessingOwner
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDOutwardProcessingOwner)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDOutwardProcessingOwner
Return CType(Serializer.Deserialize(s), DEXPDDOutwardProcessingOwner)
End Function
#End Region
'''
''' Serializes current DEXPDDOutwardProcessingOwner 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDOutwardProcessingOwner object
'''
''' string xml file to load and deserialize
''' Output DEXPDDOutwardProcessingOwner 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 DEXPDDOutwardProcessingOwner, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDOutwardProcessingOwner)
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 DEXPDDOutwardProcessingOwner) 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 DEXPDDOutwardProcessingOwner
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDOutwardProcessingOwnerClass
'''
_
Item2
End Enum
_
Partial Public Class DEXPDDOutwardProcessingOwnerIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As DEXPDDOutwardProcessingOwnerIdentificationSubsidiaryNumber
Private Shared sSerializer As XmlSerializer
#End Region
_
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set(value As String)
Me._referenceNumber = Value
End Set
End Property
Public Property SubsidiaryNumber() As DEXPDDOutwardProcessingOwnerIdentificationSubsidiaryNumber
Get
Return Me._subsidiaryNumber
End Get
Set(value As DEXPDDOutwardProcessingOwnerIdentificationSubsidiaryNumber)
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDDOutwardProcessingOwnerIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current DEXPDDOutwardProcessingOwnerIdentification object into an XML string
'''
''' string XML value
Public Overridable Function Serialize() As String
Dim streamReader As System.IO.StreamReader = Nothing
Dim memoryStream As System.IO.MemoryStream = Nothing
Try
memoryStream = New System.IO.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)
Serializer.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New System.IO.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 workflow markup into an DEXPDDOutwardProcessingOwnerIdentification object
'''
''' string workflow markup to deserialize
''' Output DEXPDDOutwardProcessingOwnerIdentification 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 DEXPDDOutwardProcessingOwnerIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDOutwardProcessingOwnerIdentification)
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 DEXPDDOutwardProcessingOwnerIdentification) 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 DEXPDDOutwardProcessingOwnerIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPDDOutwardProcessingOwnerIdentification)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As System.IO.Stream) As DEXPDDOutwardProcessingOwnerIdentification
Return CType(Serializer.Deserialize(s), DEXPDDOutwardProcessingOwnerIdentification)
End Function
#End Region
'''
''' Serializes current DEXPDDOutwardProcessingOwnerIdentification 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 System.IO.StreamWriter = Nothing
Try
Dim xmlString As String = Serialize()
Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName)
streamWriter = xmlFile.CreateText
streamWriter.WriteLine(xmlString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
'''
''' Deserializes xml markup from file into an DEXPDDOutwardProcessingOwnerIdentification object
'''
''' string xml file to load and deserialize
''' Output DEXPDDOutwardProcessingOwnerIdentification 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 DEXPDDOutwardProcessingOwnerIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DEXPDDOutwardProcessingOwnerIdentification)
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 DEXPDDOutwardProcessingOwnerIdentification) 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 DEXPDDOutwardProcessingOwnerIdentification
Dim file As System.IO.FileStream = Nothing
Dim sr As System.IO.StreamReader = Nothing
Try
file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New System.IO.StreamReader(file)
Dim xmlString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(xmlString)
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 DEXPDDOutwardProcessingOwnerIdentificationSubsidiaryNumber
'''
_
Item0000
End Enum