'' ------------------------------------------------------------------------------
''
'' Generated by Xsd2Code++. Version 5.0.0.47. www.xsd2code.com
'' agsCustomsExchangeListVisualBasicFalseFalseFalseOnlyIfDifferentFalseNet45AllTrueTrueTrueFalseFalseFalseFalseFalseNoneStartWithUnderscoreFalseFalseFalseFalseFalsePublicTrueFalseFalseFalseFalseFalseFalseFalseFalseTrueTrueTrueFalseTrueSerializeDeserializeSaveToFileLoadFromFileFalseTrueIndent2SpaceFalseFalseUTF8XmlSerializerFalseFalseFalseFalseFalseFalseFalseEntityBaseFalseFalse
''
'' ------------------------------------------------------------------------------
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 agsCustomsExchange
Partial Public Class exchangeRequestType
#Region "Private fields"
Private _uuid As String
Private _version As String
Private _requestDateTime As Date
Private _creationDateTime As Date
Private _dispatchCountry As String
Private _destinationCountry As String
Private _localReferenceNumber As String
Private _movementReferenceNumber As String
Private _declaration As declarationType
Private _goodsShipment As goodsShipmentType
Private _attachments As List(Of attachmentType)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._attachments = New List(Of attachmentType)()
Me._goodsShipment = New goodsShipmentType()
Me._declaration = New declarationType()
End Sub
Public Property uuid() As String
Get
Return Me._uuid
End Get
Set
Me._uuid = Value
End Set
End Property
Public Property version() As String
Get
Return Me._version
End Get
Set
Me._version = Value
End Set
End Property
Public Property requestDateTime() As Date
Get
Return Me._requestDateTime
End Get
Set
Me._requestDateTime = Value
End Set
End Property
Public Property creationDateTime() As Date
Get
Return Me._creationDateTime
End Get
Set
Me._creationDateTime = Value
End Set
End Property
Public Property dispatchCountry() As String
Get
Return Me._dispatchCountry
End Get
Set
Me._dispatchCountry = Value
End Set
End Property
Public Property destinationCountry() As String
Get
Return Me._destinationCountry
End Get
Set
Me._destinationCountry = Value
End Set
End Property
Public Property localReferenceNumber() As String
Get
Return Me._localReferenceNumber
End Get
Set
Me._localReferenceNumber = Value
End Set
End Property
Public Property movementReferenceNumber() As String
Get
Return Me._movementReferenceNumber
End Get
Set
Me._movementReferenceNumber = Value
End Set
End Property
Public Property declaration() As declarationType
Get
Return Me._declaration
End Get
Set
Me._declaration = Value
End Set
End Property
Public Property goodsShipment() As goodsShipmentType
Get
Return Me._goodsShipment
End Get
Set
Me._goodsShipment = Value
End Set
End Property
Public Property attachments() As List(Of attachmentType)
Get
Return Me._attachments
End Get
Set
Me._attachments = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(exchangeRequestType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current exchangeRequestType 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 exchangeRequestType object
'''
''' string workflow markup to deserialize
''' Output exchangeRequestType 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 exchangeRequestType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, exchangeRequestType)
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 exchangeRequestType) 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 exchangeRequestType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), exchangeRequestType)
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 exchangeRequestType
Return CType(Serializer.Deserialize(s), exchangeRequestType)
End Function
#End Region
'''
''' Serializes current exchangeRequestType 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 exchangeRequestType object
'''
''' string xml file to load and deserialize
''' Output exchangeRequestType 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 exchangeRequestType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, exchangeRequestType)
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 exchangeRequestType) 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 exchangeRequestType
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 declarationType
#Region "Private fields"
Private _declarationOffice As String
Private _declarationCode As declarationCode
Private _declarationTypeCode As declarationTypeCode
Private _procedure As procedure
Private _commercialReferenceNumber As String
Private _invoiceAmount As priceType_18_2
Private _deductibleAmount As priceType_16_2
Private _transportCostsAmount As priceType_16_2
Private _insuranceCostsAmount As priceType_16_2
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._insuranceCostsAmount = New priceType_16_2()
Me._transportCostsAmount = New priceType_16_2()
Me._deductibleAmount = New priceType_16_2()
Me._invoiceAmount = New priceType_18_2()
End Sub
Public Property declarationOffice() As String
Get
Return Me._declarationOffice
End Get
Set
Me._declarationOffice = Value
End Set
End Property
Public Property declarationCode() As declarationCode
Get
Return Me._declarationCode
End Get
Set
Me._declarationCode = Value
End Set
End Property
Public Property declarationTypeCode() As declarationTypeCode
Get
Return Me._declarationTypeCode
End Get
Set
Me._declarationTypeCode = Value
End Set
End Property
Public Property procedure() As procedure
Get
Return Me._procedure
End Get
Set
Me._procedure = Value
End Set
End Property
Public Property commercialReferenceNumber() As String
Get
Return Me._commercialReferenceNumber
End Get
Set
Me._commercialReferenceNumber = Value
End Set
End Property
Public Property invoiceAmount() As priceType_18_2
Get
Return Me._invoiceAmount
End Get
Set
Me._invoiceAmount = Value
End Set
End Property
Public Property deductibleAmount() As priceType_16_2
Get
Return Me._deductibleAmount
End Get
Set
Me._deductibleAmount = Value
End Set
End Property
Public Property transportCostsAmount() As priceType_16_2
Get
Return Me._transportCostsAmount
End Get
Set
Me._transportCostsAmount = Value
End Set
End Property
Public Property insuranceCostsAmount() As priceType_16_2
Get
Return Me._insuranceCostsAmount
End Get
Set
Me._insuranceCostsAmount = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(declarationType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current declarationType 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 declarationType object
'''
''' string workflow markup to deserialize
''' Output declarationType 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 declarationType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, declarationType)
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 declarationType) 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 declarationType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), declarationType)
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 declarationType
Return CType(Serializer.Deserialize(s), declarationType)
End Function
#End Region
'''
''' Serializes current declarationType 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 declarationType object
'''
''' string xml file to load and deserialize
''' Output declarationType 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 declarationType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, declarationType)
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 declarationType) 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 declarationType
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 declarationCode
'''
CO
'''
EU
'''
EX
'''
IM
End Enum
Public Enum declarationTypeCode
'''
A
'''
B
'''
D
'''
E
'''
X
'''
Y
'''
Z
End Enum
Public Enum procedure
'''
A
'''
B
'''
C
'''
D
'''
E
'''
H
'''
I
'''
J
'''
K
End Enum
Partial Public Class priceType_18_2
#Region "Private fields"
Private _currency As String
Private _value As Decimal
Private Shared sSerializer As XmlSerializer
#End Region
Public Property currency() As String
Get
Return Me._currency
End Get
Set
Me._currency = Value
End Set
End Property
Public Property Value() As Decimal
Get
Return Me._value
End Get
Set
Me._value = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(priceType_18_2))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current priceType_18_2 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 priceType_18_2 object
'''
''' string workflow markup to deserialize
''' Output priceType_18_2 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 priceType_18_2, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, priceType_18_2)
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 priceType_18_2) 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 priceType_18_2
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), priceType_18_2)
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 priceType_18_2
Return CType(Serializer.Deserialize(s), priceType_18_2)
End Function
#End Region
'''
''' Serializes current priceType_18_2 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 priceType_18_2 object
'''
''' string xml file to load and deserialize
''' Output priceType_18_2 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 priceType_18_2, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, priceType_18_2)
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 priceType_18_2) 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 priceType_18_2
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 attachmentType
#Region "Private fields"
Private _attachmentName As String
Private _attachmentType1 As String
Private _attachmentReference As String
Private _binaryAttachmentData() As Byte
Private Shared sSerializer As XmlSerializer
#End Region
Public Property attachmentName() As String
Get
Return Me._attachmentName
End Get
Set
Me._attachmentName = Value
End Set
End Property
Public Property attachmentType1() As String
Get
Return Me._attachmentType1
End Get
Set
Me._attachmentType1 = Value
End Set
End Property
Public Property attachmentReference() As String
Get
Return Me._attachmentReference
End Get
Set
Me._attachmentReference = Value
End Set
End Property
Public Property binaryAttachmentData() As Byte()
Get
Return Me._binaryAttachmentData
End Get
Set
Me._binaryAttachmentData = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(attachmentType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current attachmentType 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 attachmentType object
'''
''' string workflow markup to deserialize
''' Output attachmentType 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 attachmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, attachmentType)
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 attachmentType) 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 attachmentType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), attachmentType)
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 attachmentType
Return CType(Serializer.Deserialize(s), attachmentType)
End Function
#End Region
'''
''' Serializes current attachmentType 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 attachmentType object
'''
''' string xml file to load and deserialize
''' Output attachmentType 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 attachmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, attachmentType)
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 attachmentType) 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 attachmentType
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 weightType_16_6
#Region "Private fields"
Private _massUnit As String
Private _value As Decimal
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._massUnit = "kg"
End Sub
Public Property massUnit() As String
Get
Return Me._massUnit
End Get
Set
Me._massUnit = Value
End Set
End Property
Public Property Value() As Decimal
Get
Return Me._value
End Get
Set
Me._value = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(weightType_16_6))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current weightType_16_6 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 weightType_16_6 object
'''
''' string workflow markup to deserialize
''' Output weightType_16_6 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 weightType_16_6, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, weightType_16_6)
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 weightType_16_6) 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 weightType_16_6
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), weightType_16_6)
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 weightType_16_6
Return CType(Serializer.Deserialize(s), weightType_16_6)
End Function
#End Region
'''
''' Serializes current weightType_16_6 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 weightType_16_6 object
'''
''' string xml file to load and deserialize
''' Output weightType_16_6 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 weightType_16_6, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, weightType_16_6)
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 weightType_16_6) 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 weightType_16_6
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 quantityType
#Region "Private fields"
Private _unitCode As String
Private _value As Decimal
Private Shared sSerializer As XmlSerializer
#End Region
Public Property unitCode() As String
Get
Return Me._unitCode
End Get
Set
Me._unitCode = Value
End Set
End Property
Public Property Value() As Decimal
Get
Return Me._value
End Get
Set
Me._value = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(quantityType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current quantityType 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 quantityType object
'''
''' string workflow markup to deserialize
''' Output quantityType 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 quantityType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, quantityType)
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 quantityType) 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 quantityType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), quantityType)
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 quantityType
Return CType(Serializer.Deserialize(s), quantityType)
End Function
#End Region
'''
''' Serializes current quantityType 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 quantityType object
'''
''' string xml file to load and deserialize
''' Output quantityType 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 quantityType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, quantityType)
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 quantityType) 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 quantityType
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 goodsItemType
#Region "Private fields"
Private _sequenceNumeric As Decimal
Private _customsValueAmount As priceType_16_2
Private _statisticalValueAmount As priceType_16_2
Private _additionalDocumentType As List(Of goodsItemTypeAdditionalDocumentType)
Private _additionalInformationType As List(Of goodsItemTypeAdditionalInformationType)
Private _commodityType As goodsItemTypeCommodityType
Private _goodsMeasureType As goodsItemTypeGoodsMeasureType
Private _governmentProcedureType As List(Of goodsItemTypeGovernmentProcedureType)
Private _manufacturerType As goodsItemTypeManufacturerType
Private _originType As goodsItemTypeOriginType
Private _packagingType As List(Of goodsItemTypePackagingType)
Private _previousDocumentType As List(Of goodsItemTypePreviousDocumentType)
Private _refundRecipientPartyType As goodsItemTypeRefundRecipientPartyType
Private _valuationAdjustmentType As List(Of goodsItemTypeValuationAdjustmentType)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._valuationAdjustmentType = New List(Of goodsItemTypeValuationAdjustmentType)()
Me._refundRecipientPartyType = New goodsItemTypeRefundRecipientPartyType()
Me._previousDocumentType = New List(Of goodsItemTypePreviousDocumentType)()
Me._packagingType = New List(Of goodsItemTypePackagingType)()
Me._originType = New goodsItemTypeOriginType()
Me._manufacturerType = New goodsItemTypeManufacturerType()
Me._governmentProcedureType = New List(Of goodsItemTypeGovernmentProcedureType)()
Me._goodsMeasureType = New goodsItemTypeGoodsMeasureType()
Me._commodityType = New goodsItemTypeCommodityType()
Me._additionalInformationType = New List(Of goodsItemTypeAdditionalInformationType)()
Me._additionalDocumentType = New List(Of goodsItemTypeAdditionalDocumentType)()
Me._statisticalValueAmount = New priceType_16_2()
Me._customsValueAmount = New priceType_16_2()
End Sub
Public Property sequenceNumeric() As Decimal
Get
Return Me._sequenceNumeric
End Get
Set
Me._sequenceNumeric = Value
End Set
End Property
Public Property customsValueAmount() As priceType_16_2
Get
Return Me._customsValueAmount
End Get
Set
Me._customsValueAmount = Value
End Set
End Property
Public Property statisticalValueAmount() As priceType_16_2
Get
Return Me._statisticalValueAmount
End Get
Set
Me._statisticalValueAmount = Value
End Set
End Property
Public Property additionalDocumentType() As List(Of goodsItemTypeAdditionalDocumentType)
Get
Return Me._additionalDocumentType
End Get
Set
Me._additionalDocumentType = Value
End Set
End Property
Public Property additionalInformationType() As List(Of goodsItemTypeAdditionalInformationType)
Get
Return Me._additionalInformationType
End Get
Set
Me._additionalInformationType = Value
End Set
End Property
Public Property commodityType() As goodsItemTypeCommodityType
Get
Return Me._commodityType
End Get
Set
Me._commodityType = Value
End Set
End Property
Public Property goodsMeasureType() As goodsItemTypeGoodsMeasureType
Get
Return Me._goodsMeasureType
End Get
Set
Me._goodsMeasureType = Value
End Set
End Property
Public Property governmentProcedureType() As List(Of goodsItemTypeGovernmentProcedureType)
Get
Return Me._governmentProcedureType
End Get
Set
Me._governmentProcedureType = Value
End Set
End Property
Public Property manufacturerType() As goodsItemTypeManufacturerType
Get
Return Me._manufacturerType
End Get
Set
Me._manufacturerType = Value
End Set
End Property
Public Property originType() As goodsItemTypeOriginType
Get
Return Me._originType
End Get
Set
Me._originType = Value
End Set
End Property
Public Property packagingType() As List(Of goodsItemTypePackagingType)
Get
Return Me._packagingType
End Get
Set
Me._packagingType = Value
End Set
End Property
Public Property previousDocumentType() As List(Of goodsItemTypePreviousDocumentType)
Get
Return Me._previousDocumentType
End Get
Set
Me._previousDocumentType = Value
End Set
End Property
Public Property refundRecipientPartyType() As goodsItemTypeRefundRecipientPartyType
Get
Return Me._refundRecipientPartyType
End Get
Set
Me._refundRecipientPartyType = Value
End Set
End Property
Public Property valuationAdjustmentType() As List(Of goodsItemTypeValuationAdjustmentType)
Get
Return Me._valuationAdjustmentType
End Get
Set
Me._valuationAdjustmentType = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemType 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 goodsItemType object
'''
''' string workflow markup to deserialize
''' Output goodsItemType 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 goodsItemType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemType)
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 goodsItemType) 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 goodsItemType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemType)
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 goodsItemType
Return CType(Serializer.Deserialize(s), goodsItemType)
End Function
#End Region
'''
''' Serializes current goodsItemType 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 goodsItemType object
'''
''' string xml file to load and deserialize
''' Output goodsItemType 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 goodsItemType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemType)
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 goodsItemType) 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 goodsItemType
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 priceType_16_2
#Region "Private fields"
Private _currency As String
Private _value As Decimal
Private Shared sSerializer As XmlSerializer
#End Region
Public Property currency() As String
Get
Return Me._currency
End Get
Set
Me._currency = Value
End Set
End Property
Public Property Value() As Decimal
Get
Return Me._value
End Get
Set
Me._value = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(priceType_16_2))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current priceType_16_2 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 priceType_16_2 object
'''
''' string workflow markup to deserialize
''' Output priceType_16_2 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 priceType_16_2, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, priceType_16_2)
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 priceType_16_2) 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 priceType_16_2
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), priceType_16_2)
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 priceType_16_2
Return CType(Serializer.Deserialize(s), priceType_16_2)
End Function
#End Region
'''
''' Serializes current priceType_16_2 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 priceType_16_2 object
'''
''' string xml file to load and deserialize
''' Output priceType_16_2 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 priceType_16_2, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, priceType_16_2)
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 priceType_16_2) 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 priceType_16_2
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 goodsItemTypeAdditionalDocumentType
#Region "Private fields"
Private _documentCode As String
Private _documentReference As String
Private _amount As priceType_16_2
Private _quantity As quantityType
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._quantity = New quantityType()
Me._amount = New priceType_16_2()
End Sub
Public Property documentCode() As String
Get
Return Me._documentCode
End Get
Set
Me._documentCode = Value
End Set
End Property
Public Property documentReference() As String
Get
Return Me._documentReference
End Get
Set
Me._documentReference = Value
End Set
End Property
Public Property amount() As priceType_16_2
Get
Return Me._amount
End Get
Set
Me._amount = Value
End Set
End Property
Public Property quantity() As quantityType
Get
Return Me._quantity
End Get
Set
Me._quantity = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeAdditionalDocumentType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeAdditionalDocumentType 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 goodsItemTypeAdditionalDocumentType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeAdditionalDocumentType 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 goodsItemTypeAdditionalDocumentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeAdditionalDocumentType)
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 goodsItemTypeAdditionalDocumentType) 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 goodsItemTypeAdditionalDocumentType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeAdditionalDocumentType)
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 goodsItemTypeAdditionalDocumentType
Return CType(Serializer.Deserialize(s), goodsItemTypeAdditionalDocumentType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeAdditionalDocumentType 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 goodsItemTypeAdditionalDocumentType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeAdditionalDocumentType 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 goodsItemTypeAdditionalDocumentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeAdditionalDocumentType)
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 goodsItemTypeAdditionalDocumentType) 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 goodsItemTypeAdditionalDocumentType
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 goodsItemTypeAdditionalInformationType
#Region "Private fields"
Private _statementCode As String
Private _statementDescription As String
Private _statementTypeCode As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property statementCode() As String
Get
Return Me._statementCode
End Get
Set
Me._statementCode = Value
End Set
End Property
Public Property statementDescription() As String
Get
Return Me._statementDescription
End Get
Set
Me._statementDescription = Value
End Set
End Property
Public Property statementTypeCode() As String
Get
Return Me._statementTypeCode
End Get
Set
Me._statementTypeCode = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeAdditionalInformationType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeAdditionalInformationType 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 goodsItemTypeAdditionalInformationType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeAdditionalInformationType 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 goodsItemTypeAdditionalInformationType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeAdditionalInformationType)
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 goodsItemTypeAdditionalInformationType) 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 goodsItemTypeAdditionalInformationType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeAdditionalInformationType)
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 goodsItemTypeAdditionalInformationType
Return CType(Serializer.Deserialize(s), goodsItemTypeAdditionalInformationType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeAdditionalInformationType 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 goodsItemTypeAdditionalInformationType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeAdditionalInformationType 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 goodsItemTypeAdditionalInformationType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeAdditionalInformationType)
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 goodsItemTypeAdditionalInformationType) 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 goodsItemTypeAdditionalInformationType
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 goodsItemTypeCommodityType
#Region "Private fields"
Private _sequenceNumeric As Decimal
Private _description As String
Private _valueAmount As priceType_16_2
Private _classificationType As List(Of goodsItemTypeCommodityTypeClassificationType)
Private _transportEquipmentType As List(Of goodsItemTypeCommodityTypeTransportEquipmentType)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._transportEquipmentType = New List(Of goodsItemTypeCommodityTypeTransportEquipmentType)()
Me._classificationType = New List(Of goodsItemTypeCommodityTypeClassificationType)()
Me._valueAmount = New priceType_16_2()
End Sub
Public Property sequenceNumeric() As Decimal
Get
Return Me._sequenceNumeric
End Get
Set
Me._sequenceNumeric = Value
End Set
End Property
Public Property description() As String
Get
Return Me._description
End Get
Set
Me._description = Value
End Set
End Property
Public Property valueAmount() As priceType_16_2
Get
Return Me._valueAmount
End Get
Set
Me._valueAmount = Value
End Set
End Property
Public Property classificationType() As List(Of goodsItemTypeCommodityTypeClassificationType)
Get
Return Me._classificationType
End Get
Set
Me._classificationType = Value
End Set
End Property
Public Property transportEquipmentType() As List(Of goodsItemTypeCommodityTypeTransportEquipmentType)
Get
Return Me._transportEquipmentType
End Get
Set
Me._transportEquipmentType = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeCommodityType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeCommodityType 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 goodsItemTypeCommodityType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeCommodityType 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 goodsItemTypeCommodityType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeCommodityType)
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 goodsItemTypeCommodityType) 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 goodsItemTypeCommodityType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeCommodityType)
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 goodsItemTypeCommodityType
Return CType(Serializer.Deserialize(s), goodsItemTypeCommodityType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeCommodityType 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 goodsItemTypeCommodityType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeCommodityType 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 goodsItemTypeCommodityType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeCommodityType)
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 goodsItemTypeCommodityType) 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 goodsItemTypeCommodityType
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 goodsItemTypeCommodityTypeClassificationType
#Region "Private fields"
Private _commodityCode As String
Private _unitedNationsDangerousGoodCode As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property commodityCode() As String
Get
Return Me._commodityCode
End Get
Set
Me._commodityCode = Value
End Set
End Property
Public Property unitedNationsDangerousGoodCode() As String
Get
Return Me._unitedNationsDangerousGoodCode
End Get
Set
Me._unitedNationsDangerousGoodCode = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeCommodityTypeClassificationType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeCommodityTypeClassificationType 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 goodsItemTypeCommodityTypeClassificationType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeCommodityTypeClassificationType 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 goodsItemTypeCommodityTypeClassificationType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeCommodityTypeClassificationType)
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 goodsItemTypeCommodityTypeClassificationType) 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 goodsItemTypeCommodityTypeClassificationType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeCommodityTypeClassificationType)
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 goodsItemTypeCommodityTypeClassificationType
Return CType(Serializer.Deserialize(s), goodsItemTypeCommodityTypeClassificationType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeCommodityTypeClassificationType 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 goodsItemTypeCommodityTypeClassificationType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeCommodityTypeClassificationType 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 goodsItemTypeCommodityTypeClassificationType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeCommodityTypeClassificationType)
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 goodsItemTypeCommodityTypeClassificationType) 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 goodsItemTypeCommodityTypeClassificationType
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 goodsItemTypeCommodityTypeTransportEquipmentType
#Region "Private fields"
Private _sequenceNumeric As Decimal
Private _equipmentIdentificationNumberId As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property sequenceNumeric() As Decimal
Get
Return Me._sequenceNumeric
End Get
Set
Me._sequenceNumeric = Value
End Set
End Property
Public Property equipmentIdentificationNumberId() As String
Get
Return Me._equipmentIdentificationNumberId
End Get
Set
Me._equipmentIdentificationNumberId = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeCommodityTypeTransportEquipmentType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeCommodityTypeTransportEquipmentType 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 goodsItemTypeCommodityTypeTransportEquipmentType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeCommodityTypeTransportEquipmentType 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 goodsItemTypeCommodityTypeTransportEquipmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeCommodityTypeTransportEquipmentType)
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 goodsItemTypeCommodityTypeTransportEquipmentType) 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 goodsItemTypeCommodityTypeTransportEquipmentType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeCommodityTypeTransportEquipmentType)
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 goodsItemTypeCommodityTypeTransportEquipmentType
Return CType(Serializer.Deserialize(s), goodsItemTypeCommodityTypeTransportEquipmentType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeCommodityTypeTransportEquipmentType 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 goodsItemTypeCommodityTypeTransportEquipmentType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeCommodityTypeTransportEquipmentType 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 goodsItemTypeCommodityTypeTransportEquipmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeCommodityTypeTransportEquipmentType)
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 goodsItemTypeCommodityTypeTransportEquipmentType) 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 goodsItemTypeCommodityTypeTransportEquipmentType
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 goodsItemTypeGoodsMeasureType
#Region "Private fields"
Private _grossMassMeasure As weightType_16_6
Private _netNetWeightMeasure As weightType_16_6
Private _tariffQuantity As Decimal
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._netNetWeightMeasure = New weightType_16_6()
Me._grossMassMeasure = New weightType_16_6()
End Sub
Public Property grossMassMeasure() As weightType_16_6
Get
Return Me._grossMassMeasure
End Get
Set
Me._grossMassMeasure = Value
End Set
End Property
Public Property netNetWeightMeasure() As weightType_16_6
Get
Return Me._netNetWeightMeasure
End Get
Set
Me._netNetWeightMeasure = Value
End Set
End Property
Public Property tariffQuantity() As Decimal
Get
Return Me._tariffQuantity
End Get
Set
Me._tariffQuantity = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeGoodsMeasureType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeGoodsMeasureType 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 goodsItemTypeGoodsMeasureType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeGoodsMeasureType 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 goodsItemTypeGoodsMeasureType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeGoodsMeasureType)
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 goodsItemTypeGoodsMeasureType) 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 goodsItemTypeGoodsMeasureType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeGoodsMeasureType)
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 goodsItemTypeGoodsMeasureType
Return CType(Serializer.Deserialize(s), goodsItemTypeGoodsMeasureType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeGoodsMeasureType 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 goodsItemTypeGoodsMeasureType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeGoodsMeasureType 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 goodsItemTypeGoodsMeasureType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeGoodsMeasureType)
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 goodsItemTypeGoodsMeasureType) 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 goodsItemTypeGoodsMeasureType
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 goodsItemTypeGovernmentProcedureType
#Region "Private fields"
Private _currentCode As String
Private _previousCode As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property currentCode() As String
Get
Return Me._currentCode
End Get
Set
Me._currentCode = Value
End Set
End Property
Public Property previousCode() As String
Get
Return Me._previousCode
End Get
Set
Me._previousCode = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeGovernmentProcedureType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeGovernmentProcedureType 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 goodsItemTypeGovernmentProcedureType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeGovernmentProcedureType 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 goodsItemTypeGovernmentProcedureType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeGovernmentProcedureType)
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 goodsItemTypeGovernmentProcedureType) 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 goodsItemTypeGovernmentProcedureType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeGovernmentProcedureType)
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 goodsItemTypeGovernmentProcedureType
Return CType(Serializer.Deserialize(s), goodsItemTypeGovernmentProcedureType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeGovernmentProcedureType 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 goodsItemTypeGovernmentProcedureType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeGovernmentProcedureType 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 goodsItemTypeGovernmentProcedureType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeGovernmentProcedureType)
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 goodsItemTypeGovernmentProcedureType) 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 goodsItemTypeGovernmentProcedureType
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 goodsItemTypeManufacturerType
#Region "Private fields"
Private _name As String
Private _id As String
Private _address As addressType
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New addressType()
End Sub
Public Property name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property id() As String
Get
Return Me._id
End Get
Set
Me._id = Value
End Set
End Property
Public Property address() As addressType
Get
Return Me._address
End Get
Set
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(goodsItemTypeManufacturerType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeManufacturerType 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 goodsItemTypeManufacturerType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeManufacturerType 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 goodsItemTypeManufacturerType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeManufacturerType)
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 goodsItemTypeManufacturerType) 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 goodsItemTypeManufacturerType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeManufacturerType)
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 goodsItemTypeManufacturerType
Return CType(Serializer.Deserialize(s), goodsItemTypeManufacturerType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeManufacturerType 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 goodsItemTypeManufacturerType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeManufacturerType 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 goodsItemTypeManufacturerType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeManufacturerType)
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 goodsItemTypeManufacturerType) 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 goodsItemTypeManufacturerType
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 addressType
#Region "Private fields"
Private _postalCode As String
Private _streetAndNumber As String
Private _city As String
Private _country As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property postalCode() As String
Get
Return Me._postalCode
End Get
Set
Me._postalCode = Value
End Set
End Property
Public Property streetAndNumber() As String
Get
Return Me._streetAndNumber
End Get
Set
Me._streetAndNumber = Value
End Set
End Property
Public Property city() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(addressType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current addressType 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 addressType object
'''
''' string workflow markup to deserialize
''' Output addressType 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 addressType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, addressType)
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 addressType) 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 addressType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), addressType)
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 addressType
Return CType(Serializer.Deserialize(s), addressType)
End Function
#End Region
'''
''' Serializes current addressType 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 addressType object
'''
''' string xml file to load and deserialize
''' Output addressType 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 addressType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, addressType)
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 addressType) 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 addressType
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 goodsItemTypeOriginType
#Region "Private fields"
Private _countryCode As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property countryCode() As String
Get
Return Me._countryCode
End Get
Set
Me._countryCode = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeOriginType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeOriginType 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 goodsItemTypeOriginType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeOriginType 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 goodsItemTypeOriginType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeOriginType)
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 goodsItemTypeOriginType) 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 goodsItemTypeOriginType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeOriginType)
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 goodsItemTypeOriginType
Return CType(Serializer.Deserialize(s), goodsItemTypeOriginType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeOriginType 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 goodsItemTypeOriginType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeOriginType 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 goodsItemTypeOriginType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeOriginType)
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 goodsItemTypeOriginType) 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 goodsItemTypeOriginType
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 goodsItemTypePackagingType
#Region "Private fields"
Private _sequenceNumeric As Decimal
Private _marksNumbersID As String
Private _packagingQuantity As Decimal
Private _typeCode As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property sequenceNumeric() As Decimal
Get
Return Me._sequenceNumeric
End Get
Set
Me._sequenceNumeric = Value
End Set
End Property
Public Property MarksNumbersID() As String
Get
Return Me._marksNumbersID
End Get
Set
Me._marksNumbersID = Value
End Set
End Property
Public Property packagingQuantity() As Decimal
Get
Return Me._packagingQuantity
End Get
Set
Me._packagingQuantity = Value
End Set
End Property
Public Property typeCode() As String
Get
Return Me._typeCode
End Get
Set
Me._typeCode = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypePackagingType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypePackagingType 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 goodsItemTypePackagingType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypePackagingType 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 goodsItemTypePackagingType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypePackagingType)
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 goodsItemTypePackagingType) 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 goodsItemTypePackagingType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypePackagingType)
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 goodsItemTypePackagingType
Return CType(Serializer.Deserialize(s), goodsItemTypePackagingType)
End Function
#End Region
'''
''' Serializes current goodsItemTypePackagingType 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 goodsItemTypePackagingType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypePackagingType 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 goodsItemTypePackagingType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypePackagingType)
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 goodsItemTypePackagingType) 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 goodsItemTypePackagingType
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 goodsItemTypePreviousDocumentType
#Region "Private fields"
Private _docTypeCode As prevDocTypeCode
Private _docSortCode As String
Private _docNr As String
Private _lineNumeric As Decimal
Private Shared sSerializer As XmlSerializer
#End Region
Public Property DocTypeCode() As prevDocTypeCode
Get
Return Me._docTypeCode
End Get
Set
Me._docTypeCode = Value
End Set
End Property
Public Property DocSortCode() As String
Get
Return Me._docSortCode
End Get
Set
Me._docSortCode = Value
End Set
End Property
Public Property DocNr() As String
Get
Return Me._docNr
End Get
Set
Me._docNr = Value
End Set
End Property
Public Property lineNumeric() As Decimal
Get
Return Me._lineNumeric
End Get
Set
Me._lineNumeric = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypePreviousDocumentType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypePreviousDocumentType 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 goodsItemTypePreviousDocumentType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypePreviousDocumentType 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 goodsItemTypePreviousDocumentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypePreviousDocumentType)
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 goodsItemTypePreviousDocumentType) 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 goodsItemTypePreviousDocumentType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypePreviousDocumentType)
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 goodsItemTypePreviousDocumentType
Return CType(Serializer.Deserialize(s), goodsItemTypePreviousDocumentType)
End Function
#End Region
'''
''' Serializes current goodsItemTypePreviousDocumentType 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 goodsItemTypePreviousDocumentType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypePreviousDocumentType 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 goodsItemTypePreviousDocumentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypePreviousDocumentType)
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 goodsItemTypePreviousDocumentType) 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 goodsItemTypePreviousDocumentType
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 prevDocTypeCode
'''
X
'''
Y
'''
Z
End Enum
Partial Public Class goodsItemTypeRefundRecipientPartyType
#Region "Private fields"
Private _name As String
Private _id As String
Private _address As addressType
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New addressType()
End Sub
Public Property name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property id() As String
Get
Return Me._id
End Get
Set
Me._id = Value
End Set
End Property
Public Property address() As addressType
Get
Return Me._address
End Get
Set
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(goodsItemTypeRefundRecipientPartyType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeRefundRecipientPartyType 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 goodsItemTypeRefundRecipientPartyType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeRefundRecipientPartyType 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 goodsItemTypeRefundRecipientPartyType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeRefundRecipientPartyType)
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 goodsItemTypeRefundRecipientPartyType) 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 goodsItemTypeRefundRecipientPartyType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeRefundRecipientPartyType)
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 goodsItemTypeRefundRecipientPartyType
Return CType(Serializer.Deserialize(s), goodsItemTypeRefundRecipientPartyType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeRefundRecipientPartyType 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 goodsItemTypeRefundRecipientPartyType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeRefundRecipientPartyType 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 goodsItemTypeRefundRecipientPartyType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeRefundRecipientPartyType)
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 goodsItemTypeRefundRecipientPartyType) 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 goodsItemTypeRefundRecipientPartyType
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 goodsItemTypeValuationAdjustmentType
#Region "Private fields"
Private _additionCode As String
Private _valuationAdjustmentAmount As priceType_16_2
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._valuationAdjustmentAmount = New priceType_16_2()
End Sub
Public Property additionCode() As String
Get
Return Me._additionCode
End Get
Set
Me._additionCode = Value
End Set
End Property
Public Property valuationAdjustmentAmount() As priceType_16_2
Get
Return Me._valuationAdjustmentAmount
End Get
Set
Me._valuationAdjustmentAmount = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(goodsItemTypeValuationAdjustmentType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsItemTypeValuationAdjustmentType 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 goodsItemTypeValuationAdjustmentType object
'''
''' string workflow markup to deserialize
''' Output goodsItemTypeValuationAdjustmentType 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 goodsItemTypeValuationAdjustmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeValuationAdjustmentType)
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 goodsItemTypeValuationAdjustmentType) 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 goodsItemTypeValuationAdjustmentType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsItemTypeValuationAdjustmentType)
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 goodsItemTypeValuationAdjustmentType
Return CType(Serializer.Deserialize(s), goodsItemTypeValuationAdjustmentType)
End Function
#End Region
'''
''' Serializes current goodsItemTypeValuationAdjustmentType 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 goodsItemTypeValuationAdjustmentType object
'''
''' string xml file to load and deserialize
''' Output goodsItemTypeValuationAdjustmentType 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 goodsItemTypeValuationAdjustmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsItemTypeValuationAdjustmentType)
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 goodsItemTypeValuationAdjustmentType) 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 goodsItemTypeValuationAdjustmentType
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 portType
#Region "Private fields"
Private _portCode As String
Private _portCountry As String
Private _portLocationName As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property portCode() As String
Get
Return Me._portCode
End Get
Set
Me._portCode = Value
End Set
End Property
Public Property portCountry() As String
Get
Return Me._portCountry
End Get
Set
Me._portCountry = Value
End Set
End Property
Public Property portLocationName() As String
Get
Return Me._portLocationName
End Get
Set
Me._portLocationName = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(portType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current portType 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 portType object
'''
''' string workflow markup to deserialize
''' Output portType 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 portType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, portType)
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 portType) 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 portType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), portType)
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 portType
Return CType(Serializer.Deserialize(s), portType)
End Function
#End Region
'''
''' Serializes current portType 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 portType object
'''
''' string xml file to load and deserialize
''' Output portType 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 portType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, portType)
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 portType) 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 portType
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 inCoTermType
#Region "Private fields"
Private _inCoTerm As inCoTerm
Private _inCoTermCountryRelationship As UShort
Private _inCoTermPlaceCode As String
Private _inCoTermPlaceName As String
Private _inCoTermPlaceDescription As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property inCoTerm() As inCoTerm
Get
Return Me._inCoTerm
End Get
Set
Me._inCoTerm = Value
End Set
End Property
Public Property inCoTermCountryRelationship() As UShort
Get
Return Me._inCoTermCountryRelationship
End Get
Set
Me._inCoTermCountryRelationship = Value
End Set
End Property
Public Property inCoTermPlaceCode() As String
Get
Return Me._inCoTermPlaceCode
End Get
Set
Me._inCoTermPlaceCode = Value
End Set
End Property
Public Property inCoTermPlaceName() As String
Get
Return Me._inCoTermPlaceName
End Get
Set
Me._inCoTermPlaceName = Value
End Set
End Property
Public Property inCoTermPlaceDescription() As String
Get
Return Me._inCoTermPlaceDescription
End Get
Set
Me._inCoTermPlaceDescription = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(inCoTermType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current inCoTermType 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 inCoTermType object
'''
''' string workflow markup to deserialize
''' Output inCoTermType 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 inCoTermType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, inCoTermType)
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 inCoTermType) 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 inCoTermType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), inCoTermType)
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 inCoTermType
Return CType(Serializer.Deserialize(s), inCoTermType)
End Function
#End Region
'''
''' Serializes current inCoTermType 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 inCoTermType object
'''
''' string xml file to load and deserialize
''' Output inCoTermType 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 inCoTermType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, inCoTermType)
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 inCoTermType) 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 inCoTermType
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 inCoTerm
'''
CFR
'''
CIF
'''
CIP
'''
CPT
'''
DAF
'''
DAP
'''
DAT
'''
DDP
'''
DDU
'''
DEQ
'''
DES
'''
EXW
'''
FAS
'''
FCA
'''
FOB
'''
XXX
End Enum
Partial Public Class consignmentType
#Region "Private fields"
Private _borderTransportMeansType As consignmentTypeBorderTransportMeansType
Private _departureTransportMeansType As consignmentTypeDepartureTransportMeansType
Private _arrivalTransportMeansType As consignmentTypeArrivalTransportMeansType
Private _freightType As consignmentTypeFreightType
Private _goodsLocationName As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._freightType = New consignmentTypeFreightType()
Me._arrivalTransportMeansType = New consignmentTypeArrivalTransportMeansType()
Me._departureTransportMeansType = New consignmentTypeDepartureTransportMeansType()
Me._borderTransportMeansType = New consignmentTypeBorderTransportMeansType()
End Sub
Public Property borderTransportMeansType() As consignmentTypeBorderTransportMeansType
Get
Return Me._borderTransportMeansType
End Get
Set
Me._borderTransportMeansType = Value
End Set
End Property
Public Property departureTransportMeansType() As consignmentTypeDepartureTransportMeansType
Get
Return Me._departureTransportMeansType
End Get
Set
Me._departureTransportMeansType = Value
End Set
End Property
Public Property arrivalTransportMeansType() As consignmentTypeArrivalTransportMeansType
Get
Return Me._arrivalTransportMeansType
End Get
Set
Me._arrivalTransportMeansType = Value
End Set
End Property
Public Property freightType() As consignmentTypeFreightType
Get
Return Me._freightType
End Get
Set
Me._freightType = Value
End Set
End Property
Public Property goodsLocationName() As String
Get
Return Me._goodsLocationName
End Get
Set
Me._goodsLocationName = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(consignmentType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current consignmentType 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 consignmentType object
'''
''' string workflow markup to deserialize
''' Output consignmentType 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 consignmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentType)
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 consignmentType) 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 consignmentType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), consignmentType)
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 consignmentType
Return CType(Serializer.Deserialize(s), consignmentType)
End Function
#End Region
'''
''' Serializes current consignmentType 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 consignmentType object
'''
''' string xml file to load and deserialize
''' Output consignmentType 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 consignmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentType)
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 consignmentType) 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 consignmentType
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 consignmentTypeBorderTransportMeansType
#Region "Private fields"
Private _modeCrossing As modeTransport
Private _nationalityCrossing As String
Private _identificationCrossingBorder As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property modeCrossing() As modeTransport
Get
Return Me._modeCrossing
End Get
Set
Me._modeCrossing = Value
End Set
End Property
Public Property nationalityCrossing() As String
Get
Return Me._nationalityCrossing
End Get
Set
Me._nationalityCrossing = Value
End Set
End Property
Public Property identificationCrossingBorder() As String
Get
Return Me._identificationCrossingBorder
End Get
Set
Me._identificationCrossingBorder = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(consignmentTypeBorderTransportMeansType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current consignmentTypeBorderTransportMeansType 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 consignmentTypeBorderTransportMeansType object
'''
''' string workflow markup to deserialize
''' Output consignmentTypeBorderTransportMeansType 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 consignmentTypeBorderTransportMeansType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeBorderTransportMeansType)
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 consignmentTypeBorderTransportMeansType) 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 consignmentTypeBorderTransportMeansType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), consignmentTypeBorderTransportMeansType)
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 consignmentTypeBorderTransportMeansType
Return CType(Serializer.Deserialize(s), consignmentTypeBorderTransportMeansType)
End Function
#End Region
'''
''' Serializes current consignmentTypeBorderTransportMeansType 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 consignmentTypeBorderTransportMeansType object
'''
''' string xml file to load and deserialize
''' Output consignmentTypeBorderTransportMeansType 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 consignmentTypeBorderTransportMeansType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeBorderTransportMeansType)
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 consignmentTypeBorderTransportMeansType) 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 consignmentTypeBorderTransportMeansType
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 modeTransport
'''
AIR
'''
HUMAN
'''
POSTAL
'''
RAIL
'''
ROAD
'''
SEA
'''
INLAND_WATERWAYS
End Enum
Partial Public Class consignmentTypeDepartureTransportMeansType
#Region "Private fields"
Private _modeTransport As modeTransport
Private _identificationDeparture As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property modeTransport() As modeTransport
Get
Return Me._modeTransport
End Get
Set
Me._modeTransport = Value
End Set
End Property
Public Property identificationDeparture() As String
Get
Return Me._identificationDeparture
End Get
Set
Me._identificationDeparture = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(consignmentTypeDepartureTransportMeansType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current consignmentTypeDepartureTransportMeansType 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 consignmentTypeDepartureTransportMeansType object
'''
''' string workflow markup to deserialize
''' Output consignmentTypeDepartureTransportMeansType 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 consignmentTypeDepartureTransportMeansType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeDepartureTransportMeansType)
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 consignmentTypeDepartureTransportMeansType) 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 consignmentTypeDepartureTransportMeansType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), consignmentTypeDepartureTransportMeansType)
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 consignmentTypeDepartureTransportMeansType
Return CType(Serializer.Deserialize(s), consignmentTypeDepartureTransportMeansType)
End Function
#End Region
'''
''' Serializes current consignmentTypeDepartureTransportMeansType 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 consignmentTypeDepartureTransportMeansType object
'''
''' string xml file to load and deserialize
''' Output consignmentTypeDepartureTransportMeansType 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 consignmentTypeDepartureTransportMeansType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeDepartureTransportMeansType)
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 consignmentTypeDepartureTransportMeansType) 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 consignmentTypeDepartureTransportMeansType
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 consignmentTypeArrivalTransportMeansType
#Region "Private fields"
Private _modeTransport As modeTransport
Private _identificationArrival As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property modeTransport() As modeTransport
Get
Return Me._modeTransport
End Get
Set
Me._modeTransport = Value
End Set
End Property
Public Property identificationArrival() As String
Get
Return Me._identificationArrival
End Get
Set
Me._identificationArrival = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(consignmentTypeArrivalTransportMeansType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current consignmentTypeArrivalTransportMeansType 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 consignmentTypeArrivalTransportMeansType object
'''
''' string workflow markup to deserialize
''' Output consignmentTypeArrivalTransportMeansType 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 consignmentTypeArrivalTransportMeansType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeArrivalTransportMeansType)
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 consignmentTypeArrivalTransportMeansType) 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 consignmentTypeArrivalTransportMeansType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), consignmentTypeArrivalTransportMeansType)
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 consignmentTypeArrivalTransportMeansType
Return CType(Serializer.Deserialize(s), consignmentTypeArrivalTransportMeansType)
End Function
#End Region
'''
''' Serializes current consignmentTypeArrivalTransportMeansType 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 consignmentTypeArrivalTransportMeansType object
'''
''' string xml file to load and deserialize
''' Output consignmentTypeArrivalTransportMeansType 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 consignmentTypeArrivalTransportMeansType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeArrivalTransportMeansType)
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 consignmentTypeArrivalTransportMeansType) 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 consignmentTypeArrivalTransportMeansType
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 consignmentTypeFreightType
#Region "Private fields"
Private _paymentMethod As modePaymentTransport
Private Shared sSerializer As XmlSerializer
#End Region
Public Property paymentMethod() As modePaymentTransport
Get
Return Me._paymentMethod
End Get
Set
Me._paymentMethod = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(consignmentTypeFreightType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current consignmentTypeFreightType 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 consignmentTypeFreightType object
'''
''' string workflow markup to deserialize
''' Output consignmentTypeFreightType 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 consignmentTypeFreightType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeFreightType)
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 consignmentTypeFreightType) 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 consignmentTypeFreightType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), consignmentTypeFreightType)
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 consignmentTypeFreightType
Return CType(Serializer.Deserialize(s), consignmentTypeFreightType)
End Function
#End Region
'''
''' Serializes current consignmentTypeFreightType 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 consignmentTypeFreightType object
'''
''' string xml file to load and deserialize
''' Output consignmentTypeFreightType 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 consignmentTypeFreightType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignmentTypeFreightType)
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 consignmentTypeFreightType) 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 consignmentTypeFreightType
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 modePaymentTransport
'''
CASH
'''
CREDIT_CARD
'''
CHECK
'''
OTHER
'''
ELECTRONIC
'''
ACCOUNT_HOLDER
'''
NOT_PAYED_BEFOREHAND
End Enum
Partial Public Class consignorType
#Region "Private fields"
Private _name As String
Private _address As addressType
Private _eoriNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New addressType()
End Sub
Public Property name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property address() As addressType
Get
Return Me._address
End Get
Set
Me._address = Value
End Set
End Property
Public Property eoriNumber() As String
Get
Return Me._eoriNumber
End Get
Set
Me._eoriNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(consignorType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current consignorType 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 consignorType object
'''
''' string workflow markup to deserialize
''' Output consignorType 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 consignorType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignorType)
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 consignorType) 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 consignorType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), consignorType)
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 consignorType
Return CType(Serializer.Deserialize(s), consignorType)
End Function
#End Region
'''
''' Serializes current consignorType 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 consignorType object
'''
''' string xml file to load and deserialize
''' Output consignorType 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 consignorType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consignorType)
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 consignorType) 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 consignorType
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 consigneeType
#Region "Private fields"
Private _name As String
Private _address As addressType
Private _eoriNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New addressType()
End Sub
Public Property name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property address() As addressType
Get
Return Me._address
End Get
Set
Me._address = Value
End Set
End Property
Public Property eoriNumber() As String
Get
Return Me._eoriNumber
End Get
Set
Me._eoriNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(consigneeType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current consigneeType 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 consigneeType object
'''
''' string workflow markup to deserialize
''' Output consigneeType 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 consigneeType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consigneeType)
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 consigneeType) 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 consigneeType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), consigneeType)
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 consigneeType
Return CType(Serializer.Deserialize(s), consigneeType)
End Function
#End Region
'''
''' Serializes current consigneeType 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 consigneeType object
'''
''' string xml file to load and deserialize
''' Output consigneeType 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 consigneeType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, consigneeType)
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 consigneeType) 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 consigneeType
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 goodsShipmentType
#Region "Private fields"
Private _countryOfExportation As String
Private _natureOfTransaction As UShort
Private _deliveryDestination As String
Private _consignee As consigneeType
Private _consignor As consignorType
Private _consignment As consignmentType
Private _exitOffice As String
Private _internationalCommercialTerms As inCoTermType
Private _portOfLoading As portType
Private _portOfDischarge As portType
Private _shippingLine As String
Private _goodsItem As List(Of goodsItemType)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of goodsItemType)()
Me._portOfDischarge = New portType()
Me._portOfLoading = New portType()
Me._internationalCommercialTerms = New inCoTermType()
Me._consignment = New consignmentType()
Me._consignor = New consignorType()
Me._consignee = New consigneeType()
End Sub
Public Property countryOfExportation() As String
Get
Return Me._countryOfExportation
End Get
Set
Me._countryOfExportation = Value
End Set
End Property
Public Property natureOfTransaction() As UShort
Get
Return Me._natureOfTransaction
End Get
Set
Me._natureOfTransaction = Value
End Set
End Property
Public Property deliveryDestination() As String
Get
Return Me._deliveryDestination
End Get
Set
Me._deliveryDestination = Value
End Set
End Property
Public Property consignee() As consigneeType
Get
Return Me._consignee
End Get
Set
Me._consignee = Value
End Set
End Property
Public Property consignor() As consignorType
Get
Return Me._consignor
End Get
Set
Me._consignor = Value
End Set
End Property
Public Property consignment() As consignmentType
Get
Return Me._consignment
End Get
Set
Me._consignment = Value
End Set
End Property
Public Property exitOffice() As String
Get
Return Me._exitOffice
End Get
Set
Me._exitOffice = Value
End Set
End Property
Public Property internationalCommercialTerms() As inCoTermType
Get
Return Me._internationalCommercialTerms
End Get
Set
Me._internationalCommercialTerms = Value
End Set
End Property
Public Property portOfLoading() As portType
Get
Return Me._portOfLoading
End Get
Set
Me._portOfLoading = Value
End Set
End Property
Public Property portOfDischarge() As portType
Get
Return Me._portOfDischarge
End Get
Set
Me._portOfDischarge = Value
End Set
End Property
Public Property shippingLine() As String
Get
Return Me._shippingLine
End Get
Set
Me._shippingLine = Value
End Set
End Property
Public Property goodsItem() As List(Of goodsItemType)
Get
Return Me._goodsItem
End Get
Set
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(goodsShipmentType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current goodsShipmentType 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 goodsShipmentType object
'''
''' string workflow markup to deserialize
''' Output goodsShipmentType 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 goodsShipmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsShipmentType)
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 goodsShipmentType) 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 goodsShipmentType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), goodsShipmentType)
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 goodsShipmentType
Return CType(Serializer.Deserialize(s), goodsShipmentType)
End Function
#End Region
'''
''' Serializes current goodsShipmentType 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 goodsShipmentType object
'''
''' string xml file to load and deserialize
''' Output goodsShipmentType 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 goodsShipmentType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, goodsShipmentType)
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 goodsShipmentType) 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 goodsShipmentType
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 principalType
#Region "Private fields"
Private _nameType As principalTypeNameType
Private _address As addressType
Private _taxIdentificationNumber As String
Private _contactPersonType As principalTypeContactPersonType
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._contactPersonType = New principalTypeContactPersonType()
Me._address = New addressType()
Me._nameType = New principalTypeNameType()
End Sub
Public Property nameType() As principalTypeNameType
Get
Return Me._nameType
End Get
Set
Me._nameType = Value
End Set
End Property
Public Property address() As addressType
Get
Return Me._address
End Get
Set
Me._address = Value
End Set
End Property
Public Property taxIdentificationNumber() As String
Get
Return Me._taxIdentificationNumber
End Get
Set
Me._taxIdentificationNumber = Value
End Set
End Property
Public Property contactPersonType() As principalTypeContactPersonType
Get
Return Me._contactPersonType
End Get
Set
Me._contactPersonType = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(principalType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current principalType 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 principalType object
'''
''' string workflow markup to deserialize
''' Output principalType 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 principalType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, principalType)
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 principalType) 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 principalType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), principalType)
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 principalType
Return CType(Serializer.Deserialize(s), principalType)
End Function
#End Region
'''
''' Serializes current principalType 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 principalType object
'''
''' string xml file to load and deserialize
''' Output principalType 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 principalType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, principalType)
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 principalType) 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 principalType
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 principalTypeNameType
#Region "Private fields"
Private _language As String
Private _value As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property language() As String
Get
Return Me._language
End Get
Set
Me._language = Value
End Set
End Property
Public Property Value() As String
Get
Return Me._value
End Get
Set
Me._value = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(principalTypeNameType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current principalTypeNameType 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 principalTypeNameType object
'''
''' string workflow markup to deserialize
''' Output principalTypeNameType 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 principalTypeNameType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, principalTypeNameType)
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 principalTypeNameType) 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 principalTypeNameType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), principalTypeNameType)
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 principalTypeNameType
Return CType(Serializer.Deserialize(s), principalTypeNameType)
End Function
#End Region
'''
''' Serializes current principalTypeNameType 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 principalTypeNameType object
'''
''' string xml file to load and deserialize
''' Output principalTypeNameType 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 principalTypeNameType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, principalTypeNameType)
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 principalTypeNameType) 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 principalTypeNameType
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 principalTypeContactPersonType
#Region "Private fields"
Private _contactPersonName As String
Private _contactPersonCommunicationNumber As String
Private _contactPersonEmail As String
Private _contactPersonFaxNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property contactPersonName() As String
Get
Return Me._contactPersonName
End Get
Set
Me._contactPersonName = Value
End Set
End Property
Public Property contactPersonCommunicationNumber() As String
Get
Return Me._contactPersonCommunicationNumber
End Get
Set
Me._contactPersonCommunicationNumber = Value
End Set
End Property
Public Property contactPersonEmail() As String
Get
Return Me._contactPersonEmail
End Get
Set
Me._contactPersonEmail = Value
End Set
End Property
Public Property contactPersonFaxNumber() As String
Get
Return Me._contactPersonFaxNumber
End Get
Set
Me._contactPersonFaxNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(principalTypeContactPersonType))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current principalTypeContactPersonType 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 principalTypeContactPersonType object
'''
''' string workflow markup to deserialize
''' Output principalTypeContactPersonType 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 principalTypeContactPersonType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, principalTypeContactPersonType)
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 principalTypeContactPersonType) 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 principalTypeContactPersonType
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), principalTypeContactPersonType)
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 principalTypeContactPersonType
Return CType(Serializer.Deserialize(s), principalTypeContactPersonType)
End Function
#End Region
'''
''' Serializes current principalTypeContactPersonType 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 principalTypeContactPersonType object
'''
''' string xml file to load and deserialize
''' Output principalTypeContactPersonType 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 principalTypeContactPersonType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, principalTypeContactPersonType)
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 principalTypeContactPersonType) 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 principalTypeContactPersonType
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
End Namespace