'' ------------------------------------------------------------------------------
''
'' Generated by Xsd2Code++. Version 5.0.0.47. www.xsd2code.com
'' FCFCDDListVisualBasicFalseFalseFalseOnlyIfDifferentFalseNet45AllTrueTrueTrueFalseFalseFalseFalseFalseNoneStartWithUnderscoreFalseFalseFalseFalseFalsePublicTrueFalseFalseFalseFalseFalseFalseFalseFalseTrueTrueTrueFalseTrueSerializeDeserializeSaveToFileLoadFromFileFalseTrueIndent2SpaceFalseFalseUTF8XmlSerializerFalseFalseFalseFalseFalseFalseFalseEntityBaseFalseFalse
''
'' ------------------------------------------------------------------------------
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 FCFCDD
Partial Public Class FCFCDD
#Region "Private fields"
Private _metaData As FCFCDDMetaData
Private _header As FCFCDDHeader
Private _declarant As FCFCDDDeclarant
Private _representative As FCFCDDRepresentative
Private _principal As FCFCDDPrincipal
Private _contactPerson As FCFCDDContactPerson
Private _dutyDefermentApproval As List(Of FCFCDDDutyDefermentApproval)
Private _borderTransportMeans As FCFCDDBorderTransportMeans
Private _arrivalTransportMeans As FCFCDDArrivalTransportMeans
Private _previousAdministrativeReferences As FCFCDDPreviousAdministrativeReferences
Private _summaryDeclaration As FCFCDDSummaryDeclaration
Private _customsWarehouse As FCFCDDCustomsWarehouse
Private _inwardProcessing As FCFCDDInwardProcessing
Private _body As FCFCDDBody
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._body = New FCFCDDBody()
Me._inwardProcessing = New FCFCDDInwardProcessing()
Me._customsWarehouse = New FCFCDDCustomsWarehouse()
Me._summaryDeclaration = New FCFCDDSummaryDeclaration()
Me._previousAdministrativeReferences = New FCFCDDPreviousAdministrativeReferences()
Me._arrivalTransportMeans = New FCFCDDArrivalTransportMeans()
Me._borderTransportMeans = New FCFCDDBorderTransportMeans()
Me._dutyDefermentApproval = New List(Of FCFCDDDutyDefermentApproval)()
Me._contactPerson = New FCFCDDContactPerson()
Me._principal = New FCFCDDPrincipal()
Me._representative = New FCFCDDRepresentative()
Me._declarant = New FCFCDDDeclarant()
Me._header = New FCFCDDHeader()
Me._metaData = New FCFCDDMetaData()
End Sub
Public Property MetaData() As FCFCDDMetaData
Get
Return Me._metaData
End Get
Set
Me._metaData = Value
End Set
End Property
Public Property Header() As FCFCDDHeader
Get
Return Me._header
End Get
Set
Me._header = Value
End Set
End Property
Public Property Declarant() As FCFCDDDeclarant
Get
Return Me._declarant
End Get
Set
Me._declarant = Value
End Set
End Property
Public Property Representative() As FCFCDDRepresentative
Get
Return Me._representative
End Get
Set
Me._representative = Value
End Set
End Property
Public Property Principal() As FCFCDDPrincipal
Get
Return Me._principal
End Get
Set
Me._principal = Value
End Set
End Property
Public Property ContactPerson() As FCFCDDContactPerson
Get
Return Me._contactPerson
End Get
Set
Me._contactPerson = Value
End Set
End Property
Public Property DutyDefermentApproval() As List(Of FCFCDDDutyDefermentApproval)
Get
Return Me._dutyDefermentApproval
End Get
Set
Me._dutyDefermentApproval = Value
End Set
End Property
Public Property BorderTransportMeans() As FCFCDDBorderTransportMeans
Get
Return Me._borderTransportMeans
End Get
Set
Me._borderTransportMeans = Value
End Set
End Property
Public Property ArrivalTransportMeans() As FCFCDDArrivalTransportMeans
Get
Return Me._arrivalTransportMeans
End Get
Set
Me._arrivalTransportMeans = Value
End Set
End Property
Public Property PreviousAdministrativeReferences() As FCFCDDPreviousAdministrativeReferences
Get
Return Me._previousAdministrativeReferences
End Get
Set
Me._previousAdministrativeReferences = Value
End Set
End Property
Public Property SummaryDeclaration() As FCFCDDSummaryDeclaration
Get
Return Me._summaryDeclaration
End Get
Set
Me._summaryDeclaration = Value
End Set
End Property
Public Property CustomsWarehouse() As FCFCDDCustomsWarehouse
Get
Return Me._customsWarehouse
End Get
Set
Me._customsWarehouse = Value
End Set
End Property
Public Property InwardProcessing() As FCFCDDInwardProcessing
Get
Return Me._inwardProcessing
End Get
Set
Me._inwardProcessing = Value
End Set
End Property
Public Property Body() As FCFCDDBody
Get
Return Me._body
End Get
Set
Me._body = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDD))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDD 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 FCFCDD object
'''
''' string workflow markup to deserialize
''' Output FCFCDD 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 FCFCDD, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDD)
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 FCFCDD) 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 FCFCDD
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDD)
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 FCFCDD
Return CType(Serializer.Deserialize(s), FCFCDD)
End Function
#End Region
'''
''' Serializes current FCFCDD 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 FCFCDD object
'''
''' string xml file to load and deserialize
''' Output FCFCDD 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 FCFCDD, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDD)
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 FCFCDD) 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 FCFCDD
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 FCFCDDMetaData
#Region "Private fields"
Private _preparation As FCFCDDMetaDataPreparation
Private _interchangeControlReference As String
Private _messageReferenceNumber As String
Private _messageIdentifier As String
Private _messageGroup As FCFCDDMetaDataMessageGroup
Private _testIndicator As FCFCDDMetaDataTestIndicator
Private _messageType As FCFCDDMetaDataMessageType
Private _interchangeSender As FCFCDDMetaDataInterchangeSender
Private _interchangeRecipient As FCFCDDMetaDataInterchangeRecipient
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._interchangeRecipient = New FCFCDDMetaDataInterchangeRecipient()
Me._interchangeSender = New FCFCDDMetaDataInterchangeSender()
Me._preparation = New FCFCDDMetaDataPreparation()
End Sub
Public Property Preparation() As FCFCDDMetaDataPreparation
Get
Return Me._preparation
End Get
Set
Me._preparation = Value
End Set
End Property
Public Property InterchangeControlReference() As String
Get
Return Me._interchangeControlReference
End Get
Set
Me._interchangeControlReference = Value
End Set
End Property
Public Property MessageReferenceNumber() As String
Get
Return Me._messageReferenceNumber
End Get
Set
Me._messageReferenceNumber = Value
End Set
End Property
Public Property MessageIdentifier() As String
Get
Return Me._messageIdentifier
End Get
Set
Me._messageIdentifier = Value
End Set
End Property
Public Property MessageGroup() As FCFCDDMetaDataMessageGroup
Get
Return Me._messageGroup
End Get
Set
Me._messageGroup = Value
End Set
End Property
Public Property TestIndicator() As FCFCDDMetaDataTestIndicator
Get
Return Me._testIndicator
End Get
Set
Me._testIndicator = Value
End Set
End Property
Public Property MessageType() As FCFCDDMetaDataMessageType
Get
Return Me._messageType
End Get
Set
Me._messageType = Value
End Set
End Property
Public Property InterchangeSender() As FCFCDDMetaDataInterchangeSender
Get
Return Me._interchangeSender
End Get
Set
Me._interchangeSender = Value
End Set
End Property
Public Property InterchangeRecipient() As FCFCDDMetaDataInterchangeRecipient
Get
Return Me._interchangeRecipient
End Get
Set
Me._interchangeRecipient = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDMetaData))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDMetaData 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 FCFCDDMetaData object
'''
''' string workflow markup to deserialize
''' Output FCFCDDMetaData 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 FCFCDDMetaData, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaData)
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 FCFCDDMetaData) 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 FCFCDDMetaData
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDMetaData)
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 FCFCDDMetaData
Return CType(Serializer.Deserialize(s), FCFCDDMetaData)
End Function
#End Region
'''
''' Serializes current FCFCDDMetaData 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 FCFCDDMetaData object
'''
''' string xml file to load and deserialize
''' Output FCFCDDMetaData 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 FCFCDDMetaData, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaData)
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 FCFCDDMetaData) 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 FCFCDDMetaData
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 FCFCDDMetaDataPreparation
#Region "Private fields"
Private _date As Date
Private _time As Date
Private Shared sSerializer As XmlSerializer
#End Region
Public Property [Date]() As Date
Get
Return Me._date
End Get
Set
Me._date = Value
End Set
End Property
Public Property Time() As Date
Get
Return Me._time
End Get
Set
Me._time = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDMetaDataPreparation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDMetaDataPreparation 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 FCFCDDMetaDataPreparation object
'''
''' string workflow markup to deserialize
''' Output FCFCDDMetaDataPreparation 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 FCFCDDMetaDataPreparation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataPreparation)
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 FCFCDDMetaDataPreparation) 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 FCFCDDMetaDataPreparation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDMetaDataPreparation)
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 FCFCDDMetaDataPreparation
Return CType(Serializer.Deserialize(s), FCFCDDMetaDataPreparation)
End Function
#End Region
'''
''' Serializes current FCFCDDMetaDataPreparation 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 FCFCDDMetaDataPreparation object
'''
''' string xml file to load and deserialize
''' Output FCFCDDMetaDataPreparation 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 FCFCDDMetaDataPreparation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataPreparation)
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 FCFCDDMetaDataPreparation) 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 FCFCDDMetaDataPreparation
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 FCFCDDMetaDataMessageGroup
'''
ZBE
'''
ZBV
End Enum
Public Enum FCFCDDMetaDataTestIndicator
'''
Item1
End Enum
Public Enum FCFCDDMetaDataMessageType
'''
FCFCDD
End Enum
Partial Public Class FCFCDDMetaDataInterchangeSender
#Region "Private fields"
Private _identification As FCFCDDMetaDataInterchangeSenderIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDDMetaDataInterchangeSenderIdentification()
End Sub
Public Property Identification() As FCFCDDMetaDataInterchangeSenderIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDMetaDataInterchangeSender))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDMetaDataInterchangeSender 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 FCFCDDMetaDataInterchangeSender object
'''
''' string workflow markup to deserialize
''' Output FCFCDDMetaDataInterchangeSender 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 FCFCDDMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeSender)
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 FCFCDDMetaDataInterchangeSender) 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 FCFCDDMetaDataInterchangeSender
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDMetaDataInterchangeSender)
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 FCFCDDMetaDataInterchangeSender
Return CType(Serializer.Deserialize(s), FCFCDDMetaDataInterchangeSender)
End Function
#End Region
'''
''' Serializes current FCFCDDMetaDataInterchangeSender 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 FCFCDDMetaDataInterchangeSender object
'''
''' string xml file to load and deserialize
''' Output FCFCDDMetaDataInterchangeSender 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 FCFCDDMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeSender)
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 FCFCDDMetaDataInterchangeSender) 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 FCFCDDMetaDataInterchangeSender
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 FCFCDDMetaDataInterchangeSenderIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDMetaDataInterchangeSenderIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDMetaDataInterchangeSenderIdentification 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 FCFCDDMetaDataInterchangeSenderIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDMetaDataInterchangeSenderIdentification 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 FCFCDDMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeSenderIdentification)
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 FCFCDDMetaDataInterchangeSenderIdentification) 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 FCFCDDMetaDataInterchangeSenderIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDMetaDataInterchangeSenderIdentification)
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 FCFCDDMetaDataInterchangeSenderIdentification
Return CType(Serializer.Deserialize(s), FCFCDDMetaDataInterchangeSenderIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDMetaDataInterchangeSenderIdentification 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 FCFCDDMetaDataInterchangeSenderIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDMetaDataInterchangeSenderIdentification 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 FCFCDDMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeSenderIdentification)
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 FCFCDDMetaDataInterchangeSenderIdentification) 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 FCFCDDMetaDataInterchangeSenderIdentification
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 FCFCDDMetaDataInterchangeRecipient
#Region "Private fields"
Private _identification As FCFCDDMetaDataInterchangeRecipientIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDDMetaDataInterchangeRecipientIdentification()
End Sub
Public Property Identification() As FCFCDDMetaDataInterchangeRecipientIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDMetaDataInterchangeRecipient))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDMetaDataInterchangeRecipient 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 FCFCDDMetaDataInterchangeRecipient object
'''
''' string workflow markup to deserialize
''' Output FCFCDDMetaDataInterchangeRecipient 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 FCFCDDMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeRecipient)
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 FCFCDDMetaDataInterchangeRecipient) 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 FCFCDDMetaDataInterchangeRecipient
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDMetaDataInterchangeRecipient)
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 FCFCDDMetaDataInterchangeRecipient
Return CType(Serializer.Deserialize(s), FCFCDDMetaDataInterchangeRecipient)
End Function
#End Region
'''
''' Serializes current FCFCDDMetaDataInterchangeRecipient 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 FCFCDDMetaDataInterchangeRecipient object
'''
''' string xml file to load and deserialize
''' Output FCFCDDMetaDataInterchangeRecipient 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 FCFCDDMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeRecipient)
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 FCFCDDMetaDataInterchangeRecipient) 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 FCFCDDMetaDataInterchangeRecipient
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 FCFCDDMetaDataInterchangeRecipientIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDMetaDataInterchangeRecipientIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDMetaDataInterchangeRecipientIdentification 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 FCFCDDMetaDataInterchangeRecipientIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDMetaDataInterchangeRecipientIdentification 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 FCFCDDMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeRecipientIdentification)
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 FCFCDDMetaDataInterchangeRecipientIdentification) 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 FCFCDDMetaDataInterchangeRecipientIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDMetaDataInterchangeRecipientIdentification)
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 FCFCDDMetaDataInterchangeRecipientIdentification
Return CType(Serializer.Deserialize(s), FCFCDDMetaDataInterchangeRecipientIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDMetaDataInterchangeRecipientIdentification 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 FCFCDDMetaDataInterchangeRecipientIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDMetaDataInterchangeRecipientIdentification 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 FCFCDDMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDMetaDataInterchangeRecipientIdentification)
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 FCFCDDMetaDataInterchangeRecipientIdentification) 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 FCFCDDMetaDataInterchangeRecipientIdentification
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 FCFCDDHeader
#Region "Private fields"
Private _messageVersion As String
Private _messageCreationDate As Date
Private _declaration As FCFCDDHeaderDeclaration
Private _localReferenceNumber As String
Private _prematureInputFlag As String
Private _goodsItemQuantity As String
Private _customsGoodsStatus As String
Private _declarantIsConsigneeFlag As String
Private _customsAuthorisation As FCFCDDHeaderCustomsAuthorisation
Private _inputTaxDeductionFlag As String
Private _goodsLocation As String
Private _departureCountry As String
Private _paymentMethod As FCFCDDHeaderPaymentMethod
Private _currencyCode As FCFCDDHeaderCurrencyCode
Private _additionalInformation As String
Private _taxNumber As String
Private _taxOffice As String
Private _representativeRelationshipFlag As String
Private _declarationPlace As String
Private _authorisationNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._customsAuthorisation = New FCFCDDHeaderCustomsAuthorisation()
Me._declaration = New FCFCDDHeaderDeclaration()
End Sub
Public Property MessageVersion() As String
Get
Return Me._messageVersion
End Get
Set
Me._messageVersion = Value
End Set
End Property
Public Property MessageCreationDate() As Date
Get
Return Me._messageCreationDate
End Get
Set
Me._messageCreationDate = Value
End Set
End Property
Public Property Declaration() As FCFCDDHeaderDeclaration
Get
Return Me._declaration
End Get
Set
Me._declaration = 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 PrematureInputFlag() As String
Get
Return Me._prematureInputFlag
End Get
Set
Me._prematureInputFlag = Value
End Set
End Property
Public Property GoodsItemQuantity() As String
Get
Return Me._goodsItemQuantity
End Get
Set
Me._goodsItemQuantity = Value
End Set
End Property
Public Property CustomsGoodsStatus() As String
Get
Return Me._customsGoodsStatus
End Get
Set
Me._customsGoodsStatus = Value
End Set
End Property
Public Property DeclarantIsConsigneeFlag() As String
Get
Return Me._declarantIsConsigneeFlag
End Get
Set
Me._declarantIsConsigneeFlag = Value
End Set
End Property
Public Property CustomsAuthorisation() As FCFCDDHeaderCustomsAuthorisation
Get
Return Me._customsAuthorisation
End Get
Set
Me._customsAuthorisation = Value
End Set
End Property
Public Property InputTaxDeductionFlag() As String
Get
Return Me._inputTaxDeductionFlag
End Get
Set
Me._inputTaxDeductionFlag = Value
End Set
End Property
Public Property GoodsLocation() As String
Get
Return Me._goodsLocation
End Get
Set
Me._goodsLocation = Value
End Set
End Property
Public Property DepartureCountry() As String
Get
Return Me._departureCountry
End Get
Set
Me._departureCountry = Value
End Set
End Property
Public Property PaymentMethod() As FCFCDDHeaderPaymentMethod
Get
Return Me._paymentMethod
End Get
Set
Me._paymentMethod = Value
End Set
End Property
Public Property CurrencyCode() As FCFCDDHeaderCurrencyCode
Get
Return Me._currencyCode
End Get
Set
Me._currencyCode = Value
End Set
End Property
Public Property AdditionalInformation() As String
Get
Return Me._additionalInformation
End Get
Set
Me._additionalInformation = Value
End Set
End Property
Public Property TaxNumber() As String
Get
Return Me._taxNumber
End Get
Set
Me._taxNumber = Value
End Set
End Property
Public Property TaxOffice() As String
Get
Return Me._taxOffice
End Get
Set
Me._taxOffice = Value
End Set
End Property
Public Property RepresentativeRelationshipFlag() As String
Get
Return Me._representativeRelationshipFlag
End Get
Set
Me._representativeRelationshipFlag = Value
End Set
End Property
Public Property DeclarationPlace() As String
Get
Return Me._declarationPlace
End Get
Set
Me._declarationPlace = Value
End Set
End Property
Public Property AuthorisationNumber() As String
Get
Return Me._authorisationNumber
End Get
Set
Me._authorisationNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDHeader))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDHeader 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 FCFCDDHeader object
'''
''' string workflow markup to deserialize
''' Output FCFCDDHeader 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 FCFCDDHeader, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDHeader)
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 FCFCDDHeader) 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 FCFCDDHeader
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDHeader)
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 FCFCDDHeader
Return CType(Serializer.Deserialize(s), FCFCDDHeader)
End Function
#End Region
'''
''' Serializes current FCFCDDHeader 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 FCFCDDHeader object
'''
''' string xml file to load and deserialize
''' Output FCFCDDHeader 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 FCFCDDHeader, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDHeader)
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 FCFCDDHeader) 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 FCFCDDHeader
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 FCFCDDHeaderDeclaration
#Region "Private fields"
Private _kind As FCFCDDHeaderDeclarationKind
Private _type As FCFCDDHeaderDeclarationType
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Kind() As FCFCDDHeaderDeclarationKind
Get
Return Me._kind
End Get
Set
Me._kind = Value
End Set
End Property
Public Property Type() As FCFCDDHeaderDeclarationType
Get
Return Me._type
End Get
Set
Me._type = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDHeaderDeclaration))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDHeaderDeclaration 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 FCFCDDHeaderDeclaration object
'''
''' string workflow markup to deserialize
''' Output FCFCDDHeaderDeclaration 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 FCFCDDHeaderDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDHeaderDeclaration)
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 FCFCDDHeaderDeclaration) 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 FCFCDDHeaderDeclaration
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDHeaderDeclaration)
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 FCFCDDHeaderDeclaration
Return CType(Serializer.Deserialize(s), FCFCDDHeaderDeclaration)
End Function
#End Region
'''
''' Serializes current FCFCDDHeaderDeclaration 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 FCFCDDHeaderDeclaration object
'''
''' string xml file to load and deserialize
''' Output FCFCDDHeaderDeclaration 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 FCFCDDHeaderDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDHeaderDeclaration)
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 FCFCDDHeaderDeclaration) 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 FCFCDDHeaderDeclaration
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 FCFCDDHeaderDeclarationKind
'''
A
'''
B
'''
D
'''
E
End Enum
Public Enum FCFCDDHeaderDeclarationType
'''
EZA
End Enum
Partial Public Class FCFCDDHeaderCustomsAuthorisation
#Region "Private fields"
Private _endUse As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property EndUse() As String
Get
Return Me._endUse
End Get
Set
Me._endUse = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDHeaderCustomsAuthorisation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDHeaderCustomsAuthorisation 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 FCFCDDHeaderCustomsAuthorisation object
'''
''' string workflow markup to deserialize
''' Output FCFCDDHeaderCustomsAuthorisation 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 FCFCDDHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDHeaderCustomsAuthorisation)
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 FCFCDDHeaderCustomsAuthorisation) 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 FCFCDDHeaderCustomsAuthorisation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDHeaderCustomsAuthorisation)
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 FCFCDDHeaderCustomsAuthorisation
Return CType(Serializer.Deserialize(s), FCFCDDHeaderCustomsAuthorisation)
End Function
#End Region
'''
''' Serializes current FCFCDDHeaderCustomsAuthorisation 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 FCFCDDHeaderCustomsAuthorisation object
'''
''' string xml file to load and deserialize
''' Output FCFCDDHeaderCustomsAuthorisation 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 FCFCDDHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDHeaderCustomsAuthorisation)
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 FCFCDDHeaderCustomsAuthorisation) 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 FCFCDDHeaderCustomsAuthorisation
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 FCFCDDHeaderPaymentMethod
'''
A
'''
C
'''
D
'''
E
'''
F
'''
G
'''
Y
'''
Z
End Enum
Public Enum FCFCDDHeaderCurrencyCode
'''
EUR
End Enum
Partial Public Class FCFCDDDeclarant
#Region "Private fields"
Private _identification As FCFCDDDeclarantIdentification
Private _name As String
Private _address As FCFCDDDeclarantAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDDDeclarantAddress()
Me._identification = New FCFCDDDeclarantIdentification()
End Sub
Public Property Identification() As FCFCDDDeclarantIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property Address() As FCFCDDDeclarantAddress
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(FCFCDDDeclarant))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDDeclarant 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 FCFCDDDeclarant object
'''
''' string workflow markup to deserialize
''' Output FCFCDDDeclarant 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 FCFCDDDeclarant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDeclarant)
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 FCFCDDDeclarant) 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 FCFCDDDeclarant
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDDeclarant)
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 FCFCDDDeclarant
Return CType(Serializer.Deserialize(s), FCFCDDDeclarant)
End Function
#End Region
'''
''' Serializes current FCFCDDDeclarant 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 FCFCDDDeclarant object
'''
''' string xml file to load and deserialize
''' Output FCFCDDDeclarant 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 FCFCDDDeclarant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDeclarant)
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 FCFCDDDeclarant) 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 FCFCDDDeclarant
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 FCFCDDDeclarantIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDDeclarantIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDDeclarantIdentification 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 FCFCDDDeclarantIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDDeclarantIdentification 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 FCFCDDDeclarantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDeclarantIdentification)
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 FCFCDDDeclarantIdentification) 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 FCFCDDDeclarantIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDDeclarantIdentification)
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 FCFCDDDeclarantIdentification
Return CType(Serializer.Deserialize(s), FCFCDDDeclarantIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDDeclarantIdentification 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 FCFCDDDeclarantIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDDeclarantIdentification 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 FCFCDDDeclarantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDeclarantIdentification)
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 FCFCDDDeclarantIdentification) 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 FCFCDDDeclarantIdentification
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 FCFCDDDeclarantAddress
#Region "Private fields"
Private _line As String
Private _country As String
Private _postcode As String
Private _city As String
Private _district As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Line() As String
Get
Return Me._line
End Get
Set
Me._line = Value
End Set
End Property
Public Property Country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set
Me._postcode = Value
End Set
End Property
Public Property City() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property District() As String
Get
Return Me._district
End Get
Set
Me._district = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDDeclarantAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDDeclarantAddress 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 FCFCDDDeclarantAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDDDeclarantAddress 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 FCFCDDDeclarantAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDeclarantAddress)
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 FCFCDDDeclarantAddress) 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 FCFCDDDeclarantAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDDeclarantAddress)
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 FCFCDDDeclarantAddress
Return CType(Serializer.Deserialize(s), FCFCDDDeclarantAddress)
End Function
#End Region
'''
''' Serializes current FCFCDDDeclarantAddress 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 FCFCDDDeclarantAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDDDeclarantAddress 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 FCFCDDDeclarantAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDeclarantAddress)
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 FCFCDDDeclarantAddress) 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 FCFCDDDeclarantAddress
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 FCFCDDRepresentative
#Region "Private fields"
Private _identification As FCFCDDRepresentativeIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDDRepresentativeIdentification()
End Sub
Public Property Identification() As FCFCDDRepresentativeIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDRepresentative))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDRepresentative 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 FCFCDDRepresentative object
'''
''' string workflow markup to deserialize
''' Output FCFCDDRepresentative 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 FCFCDDRepresentative, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDRepresentative)
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 FCFCDDRepresentative) 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 FCFCDDRepresentative
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDRepresentative)
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 FCFCDDRepresentative
Return CType(Serializer.Deserialize(s), FCFCDDRepresentative)
End Function
#End Region
'''
''' Serializes current FCFCDDRepresentative 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 FCFCDDRepresentative object
'''
''' string xml file to load and deserialize
''' Output FCFCDDRepresentative 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 FCFCDDRepresentative, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDRepresentative)
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 FCFCDDRepresentative) 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 FCFCDDRepresentative
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 FCFCDDRepresentativeIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDRepresentativeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDRepresentativeIdentification 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 FCFCDDRepresentativeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDRepresentativeIdentification 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 FCFCDDRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDRepresentativeIdentification)
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 FCFCDDRepresentativeIdentification) 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 FCFCDDRepresentativeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDRepresentativeIdentification)
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 FCFCDDRepresentativeIdentification
Return CType(Serializer.Deserialize(s), FCFCDDRepresentativeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDRepresentativeIdentification 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 FCFCDDRepresentativeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDRepresentativeIdentification 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 FCFCDDRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDRepresentativeIdentification)
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 FCFCDDRepresentativeIdentification) 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 FCFCDDRepresentativeIdentification
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 FCFCDDPrincipal
#Region "Private fields"
Private _identification As FCFCDDPrincipalIdentification
Private _name As String
Private _address As FCFCDDPrincipalAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDDPrincipalAddress()
Me._identification = New FCFCDDPrincipalIdentification()
End Sub
Public Property Identification() As FCFCDDPrincipalIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property Address() As FCFCDDPrincipalAddress
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(FCFCDDPrincipal))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDPrincipal 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 FCFCDDPrincipal object
'''
''' string workflow markup to deserialize
''' Output FCFCDDPrincipal 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 FCFCDDPrincipal, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPrincipal)
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 FCFCDDPrincipal) 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 FCFCDDPrincipal
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDPrincipal)
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 FCFCDDPrincipal
Return CType(Serializer.Deserialize(s), FCFCDDPrincipal)
End Function
#End Region
'''
''' Serializes current FCFCDDPrincipal 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 FCFCDDPrincipal object
'''
''' string xml file to load and deserialize
''' Output FCFCDDPrincipal 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 FCFCDDPrincipal, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPrincipal)
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 FCFCDDPrincipal) 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 FCFCDDPrincipal
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 FCFCDDPrincipalIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDPrincipalIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDPrincipalIdentification 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 FCFCDDPrincipalIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDPrincipalIdentification 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 FCFCDDPrincipalIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPrincipalIdentification)
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 FCFCDDPrincipalIdentification) 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 FCFCDDPrincipalIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDPrincipalIdentification)
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 FCFCDDPrincipalIdentification
Return CType(Serializer.Deserialize(s), FCFCDDPrincipalIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDPrincipalIdentification 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 FCFCDDPrincipalIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDPrincipalIdentification 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 FCFCDDPrincipalIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPrincipalIdentification)
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 FCFCDDPrincipalIdentification) 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 FCFCDDPrincipalIdentification
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 FCFCDDPrincipalAddress
#Region "Private fields"
Private _line As String
Private _country As String
Private _postcode As String
Private _city As String
Private _district As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Line() As String
Get
Return Me._line
End Get
Set
Me._line = Value
End Set
End Property
Public Property Country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set
Me._postcode = Value
End Set
End Property
Public Property City() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property District() As String
Get
Return Me._district
End Get
Set
Me._district = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDPrincipalAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDPrincipalAddress 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 FCFCDDPrincipalAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDDPrincipalAddress 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 FCFCDDPrincipalAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPrincipalAddress)
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 FCFCDDPrincipalAddress) 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 FCFCDDPrincipalAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDPrincipalAddress)
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 FCFCDDPrincipalAddress
Return CType(Serializer.Deserialize(s), FCFCDDPrincipalAddress)
End Function
#End Region
'''
''' Serializes current FCFCDDPrincipalAddress 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 FCFCDDPrincipalAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDDPrincipalAddress 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 FCFCDDPrincipalAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPrincipalAddress)
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 FCFCDDPrincipalAddress) 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 FCFCDDPrincipalAddress
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 FCFCDDContactPerson
#Region "Private fields"
Private _name As String
Private _position As String
Private _phoneNumber As String
Private _mailAddress As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property Position() As String
Get
Return Me._position
End Get
Set
Me._position = Value
End Set
End Property
Public Property PhoneNumber() As String
Get
Return Me._phoneNumber
End Get
Set
Me._phoneNumber = Value
End Set
End Property
Public Property MailAddress() As String
Get
Return Me._mailAddress
End Get
Set
Me._mailAddress = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDContactPerson))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDContactPerson 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 FCFCDDContactPerson object
'''
''' string workflow markup to deserialize
''' Output FCFCDDContactPerson 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 FCFCDDContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDContactPerson)
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 FCFCDDContactPerson) 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 FCFCDDContactPerson
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDContactPerson)
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 FCFCDDContactPerson
Return CType(Serializer.Deserialize(s), FCFCDDContactPerson)
End Function
#End Region
'''
''' Serializes current FCFCDDContactPerson 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 FCFCDDContactPerson object
'''
''' string xml file to load and deserialize
''' Output FCFCDDContactPerson 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 FCFCDDContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDContactPerson)
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 FCFCDDContactPerson) 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 FCFCDDContactPerson
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 FCFCDDDutyDefermentApproval
#Region "Private fields"
Private _type As String
Private _applicationType As String
Private _accountPrefix As String
Private _accountNumber As String
Private _authorisationNumber As String
Private _dutyDefermentApplicant As FCFCDDDutyDefermentApprovalDutyDefermentApplicant
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._dutyDefermentApplicant = New FCFCDDDutyDefermentApprovalDutyDefermentApplicant()
End Sub
Public Property Type() As String
Get
Return Me._type
End Get
Set
Me._type = Value
End Set
End Property
Public Property ApplicationType() As String
Get
Return Me._applicationType
End Get
Set
Me._applicationType = Value
End Set
End Property
Public Property AccountPrefix() As String
Get
Return Me._accountPrefix
End Get
Set
Me._accountPrefix = Value
End Set
End Property
Public Property AccountNumber() As String
Get
Return Me._accountNumber
End Get
Set
Me._accountNumber = Value
End Set
End Property
Public Property AuthorisationNumber() As String
Get
Return Me._authorisationNumber
End Get
Set
Me._authorisationNumber = Value
End Set
End Property
Public Property DutyDefermentApplicant() As FCFCDDDutyDefermentApprovalDutyDefermentApplicant
Get
Return Me._dutyDefermentApplicant
End Get
Set
Me._dutyDefermentApplicant = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDDutyDefermentApproval))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDDutyDefermentApproval 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 FCFCDDDutyDefermentApproval object
'''
''' string workflow markup to deserialize
''' Output FCFCDDDutyDefermentApproval 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 FCFCDDDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDutyDefermentApproval)
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 FCFCDDDutyDefermentApproval) 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 FCFCDDDutyDefermentApproval
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDDutyDefermentApproval)
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 FCFCDDDutyDefermentApproval
Return CType(Serializer.Deserialize(s), FCFCDDDutyDefermentApproval)
End Function
#End Region
'''
''' Serializes current FCFCDDDutyDefermentApproval 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 FCFCDDDutyDefermentApproval object
'''
''' string xml file to load and deserialize
''' Output FCFCDDDutyDefermentApproval 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 FCFCDDDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDutyDefermentApproval)
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 FCFCDDDutyDefermentApproval) 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 FCFCDDDutyDefermentApproval
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant
#Region "Private fields"
Private _identification As FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification()
End Sub
Public Property Identification() As FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDDutyDefermentApprovalDutyDefermentApplicant))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant object
'''
''' string workflow markup to deserialize
''' Output FCFCDDDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDutyDefermentApprovalDutyDefermentApplicant)
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDDutyDefermentApprovalDutyDefermentApplicant)
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant
Return CType(Serializer.Deserialize(s), FCFCDDDutyDefermentApprovalDutyDefermentApplicant)
End Function
#End Region
'''
''' Serializes current FCFCDDDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant object
'''
''' string xml file to load and deserialize
''' Output FCFCDDDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDutyDefermentApprovalDutyDefermentApplicant)
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicant
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification)
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification)
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification
Return CType(Serializer.Deserialize(s), FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification)
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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDDDutyDefermentApprovalDutyDefermentApplicantIdentification
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 FCFCDDBorderTransportMeans
#Region "Private fields"
Private _mode As String
Private _type As String
Private _information As String
Private _nationality As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Mode() As String
Get
Return Me._mode
End Get
Set
Me._mode = Value
End Set
End Property
Public Property Type() As String
Get
Return Me._type
End Get
Set
Me._type = Value
End Set
End Property
Public Property Information() As String
Get
Return Me._information
End Get
Set
Me._information = Value
End Set
End Property
Public Property Nationality() As String
Get
Return Me._nationality
End Get
Set
Me._nationality = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBorderTransportMeans))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBorderTransportMeans 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 FCFCDDBorderTransportMeans object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBorderTransportMeans 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 FCFCDDBorderTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBorderTransportMeans)
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 FCFCDDBorderTransportMeans) 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 FCFCDDBorderTransportMeans
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBorderTransportMeans)
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 FCFCDDBorderTransportMeans
Return CType(Serializer.Deserialize(s), FCFCDDBorderTransportMeans)
End Function
#End Region
'''
''' Serializes current FCFCDDBorderTransportMeans 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 FCFCDDBorderTransportMeans object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBorderTransportMeans 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 FCFCDDBorderTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBorderTransportMeans)
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 FCFCDDBorderTransportMeans) 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 FCFCDDBorderTransportMeans
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 FCFCDDArrivalTransportMeans
#Region "Private fields"
Private _identity As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Identity() As String
Get
Return Me._identity
End Get
Set
Me._identity = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDArrivalTransportMeans))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDArrivalTransportMeans 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 FCFCDDArrivalTransportMeans object
'''
''' string workflow markup to deserialize
''' Output FCFCDDArrivalTransportMeans 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 FCFCDDArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDArrivalTransportMeans)
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 FCFCDDArrivalTransportMeans) 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 FCFCDDArrivalTransportMeans
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDArrivalTransportMeans)
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 FCFCDDArrivalTransportMeans
Return CType(Serializer.Deserialize(s), FCFCDDArrivalTransportMeans)
End Function
#End Region
'''
''' Serializes current FCFCDDArrivalTransportMeans 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 FCFCDDArrivalTransportMeans object
'''
''' string xml file to load and deserialize
''' Output FCFCDDArrivalTransportMeans 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 FCFCDDArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDArrivalTransportMeans)
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 FCFCDDArrivalTransportMeans) 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 FCFCDDArrivalTransportMeans
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 FCFCDDPreviousAdministrativeReferences
#Region "Private fields"
Private _type As String
Private _previousAdministrativeReference As FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._previousAdministrativeReference = New FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference()
End Sub
Public Property Type() As String
Get
Return Me._type
End Get
Set
Me._type = Value
End Set
End Property
Public Property PreviousAdministrativeReference() As FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference
Get
Return Me._previousAdministrativeReference
End Get
Set
Me._previousAdministrativeReference = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDPreviousAdministrativeReferences))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDPreviousAdministrativeReferences 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 FCFCDDPreviousAdministrativeReferences object
'''
''' string workflow markup to deserialize
''' Output FCFCDDPreviousAdministrativeReferences 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 FCFCDDPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPreviousAdministrativeReferences)
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 FCFCDDPreviousAdministrativeReferences) 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 FCFCDDPreviousAdministrativeReferences
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDPreviousAdministrativeReferences)
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 FCFCDDPreviousAdministrativeReferences
Return CType(Serializer.Deserialize(s), FCFCDDPreviousAdministrativeReferences)
End Function
#End Region
'''
''' Serializes current FCFCDDPreviousAdministrativeReferences 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 FCFCDDPreviousAdministrativeReferences object
'''
''' string xml file to load and deserialize
''' Output FCFCDDPreviousAdministrativeReferences 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 FCFCDDPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPreviousAdministrativeReferences)
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 FCFCDDPreviousAdministrativeReferences) 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 FCFCDDPreviousAdministrativeReferences
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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference object
'''
''' string workflow markup to deserialize
''' Output FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference)
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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference)
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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference
Return CType(Serializer.Deserialize(s), FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference)
End Function
#End Region
'''
''' Serializes current FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference object
'''
''' string xml file to load and deserialize
''' Output FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference)
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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDDPreviousAdministrativeReferencesPreviousAdministrativeReference
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 FCFCDDSummaryDeclaration
#Region "Private fields"
Private _identificationIndicator As FCFCDDSummaryDeclarationIdentificationIndicator
Private _goodsItem As List(Of FCFCDDSummaryDeclarationGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDDSummaryDeclarationGoodsItem)()
End Sub
Public Property IdentificationIndicator() As FCFCDDSummaryDeclarationIdentificationIndicator
Get
Return Me._identificationIndicator
End Get
Set
Me._identificationIndicator = Value
End Set
End Property
Public Property GoodsItem() As List(Of FCFCDDSummaryDeclarationGoodsItem)
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(FCFCDDSummaryDeclaration))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDSummaryDeclaration 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 FCFCDDSummaryDeclaration object
'''
''' string workflow markup to deserialize
''' Output FCFCDDSummaryDeclaration 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 FCFCDDSummaryDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclaration)
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 FCFCDDSummaryDeclaration) 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 FCFCDDSummaryDeclaration
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDSummaryDeclaration)
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 FCFCDDSummaryDeclaration
Return CType(Serializer.Deserialize(s), FCFCDDSummaryDeclaration)
End Function
#End Region
'''
''' Serializes current FCFCDDSummaryDeclaration 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 FCFCDDSummaryDeclaration object
'''
''' string xml file to load and deserialize
''' Output FCFCDDSummaryDeclaration 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 FCFCDDSummaryDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclaration)
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 FCFCDDSummaryDeclaration) 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 FCFCDDSummaryDeclaration
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 FCFCDDSummaryDeclarationIdentificationIndicator
'''
AWB
'''
REG
End Enum
Partial Public Class FCFCDDSummaryDeclarationGoodsItem
#Region "Private fields"
Private _quantity As String
Private _identificationByKey As FCFCDDSummaryDeclarationGoodsItemIdentificationByKey
Private _identificationByRegistration As FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identificationByRegistration = New FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration()
Me._identificationByKey = New FCFCDDSummaryDeclarationGoodsItemIdentificationByKey()
End Sub
Public Property Quantity() As String
Get
Return Me._quantity
End Get
Set
Me._quantity = Value
End Set
End Property
Public Property IdentificationByKey() As FCFCDDSummaryDeclarationGoodsItemIdentificationByKey
Get
Return Me._identificationByKey
End Get
Set
Me._identificationByKey = Value
End Set
End Property
Public Property IdentificationByRegistration() As FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration
Get
Return Me._identificationByRegistration
End Get
Set
Me._identificationByRegistration = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDSummaryDeclarationGoodsItem))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItem 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 FCFCDDSummaryDeclarationGoodsItem object
'''
''' string workflow markup to deserialize
''' Output FCFCDDSummaryDeclarationGoodsItem 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 FCFCDDSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItem)
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 FCFCDDSummaryDeclarationGoodsItem) 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 FCFCDDSummaryDeclarationGoodsItem
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDSummaryDeclarationGoodsItem)
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 FCFCDDSummaryDeclarationGoodsItem
Return CType(Serializer.Deserialize(s), FCFCDDSummaryDeclarationGoodsItem)
End Function
#End Region
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItem 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 FCFCDDSummaryDeclarationGoodsItem object
'''
''' string xml file to load and deserialize
''' Output FCFCDDSummaryDeclarationGoodsItem 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 FCFCDDSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItem)
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 FCFCDDSummaryDeclarationGoodsItem) 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 FCFCDDSummaryDeclarationGoodsItem
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey
#Region "Private fields"
Private _kind As FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyKind
Private _number As String
Private _custodian As FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._custodian = New FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian()
End Sub
Public Property Kind() As FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyKind
Get
Return Me._kind
End Get
Set
Me._kind = Value
End Set
End Property
Public Property Number() As String
Get
Return Me._number
End Get
Set
Me._number = Value
End Set
End Property
Public Property Custodian() As FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian
Get
Return Me._custodian
End Get
Set
Me._custodian = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDSummaryDeclarationGoodsItemIdentificationByKey))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey object
'''
''' string workflow markup to deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByKey)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDSummaryDeclarationGoodsItemIdentificationByKey)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey
Return CType(Serializer.Deserialize(s), FCFCDDSummaryDeclarationGoodsItemIdentificationByKey)
End Function
#End Region
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey object
'''
''' string xml file to load and deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByKey)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKey
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyKind
'''
AWB
'''
ULD
End Enum
Partial Public Class FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian
#Region "Private fields"
Private _identification As FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification()
End Sub
Public Property Identification() As FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
'''
''' string workflow markup to deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian
Return CType(Serializer.Deserialize(s), FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
End Function
#End Region
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
'''
''' string xml file to load and deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodian
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
Return CType(Serializer.Deserialize(s), FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration
#Region "Private fields"
Private _referencedRegistrationNumber As String
Private _referencedSequenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferencedRegistrationNumber() As String
Get
Return Me._referencedRegistrationNumber
End Get
Set
Me._referencedRegistrationNumber = Value
End Set
End Property
Public Property ReferencedSequenceNumber() As String
Get
Return Me._referencedSequenceNumber
End Get
Set
Me._referencedSequenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration object
'''
''' string workflow markup to deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration
Return CType(Serializer.Deserialize(s), FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration)
End Function
#End Region
'''
''' Serializes current FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration object
'''
''' string xml file to load and deserialize
''' Output FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration)
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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDDSummaryDeclarationGoodsItemIdentificationByRegistration
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 FCFCDDCustomsWarehouse
#Region "Private fields"
Private _sequenceNumber As FCFCDDCustomsWarehouseSequenceNumber
Private _goodsItemQuantity As String
Private _customsAuthorisation As FCFCDDCustomsWarehouseCustomsAuthorisation
Private _localReferenceNumber As String
Private _goodsItem As List(Of FCFCDDCustomsWarehouseGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDDCustomsWarehouseGoodsItem)()
Me._customsAuthorisation = New FCFCDDCustomsWarehouseCustomsAuthorisation()
End Sub
Public Property SequenceNumber() As FCFCDDCustomsWarehouseSequenceNumber
Get
Return Me._sequenceNumber
End Get
Set
Me._sequenceNumber = Value
End Set
End Property
Public Property GoodsItemQuantity() As String
Get
Return Me._goodsItemQuantity
End Get
Set
Me._goodsItemQuantity = Value
End Set
End Property
Public Property CustomsAuthorisation() As FCFCDDCustomsWarehouseCustomsAuthorisation
Get
Return Me._customsAuthorisation
End Get
Set
Me._customsAuthorisation = 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 GoodsItem() As List(Of FCFCDDCustomsWarehouseGoodsItem)
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(FCFCDDCustomsWarehouse))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDCustomsWarehouse 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 FCFCDDCustomsWarehouse object
'''
''' string workflow markup to deserialize
''' Output FCFCDDCustomsWarehouse 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 FCFCDDCustomsWarehouse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouse)
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 FCFCDDCustomsWarehouse) 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 FCFCDDCustomsWarehouse
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDCustomsWarehouse)
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 FCFCDDCustomsWarehouse
Return CType(Serializer.Deserialize(s), FCFCDDCustomsWarehouse)
End Function
#End Region
'''
''' Serializes current FCFCDDCustomsWarehouse 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 FCFCDDCustomsWarehouse object
'''
''' string xml file to load and deserialize
''' Output FCFCDDCustomsWarehouse 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 FCFCDDCustomsWarehouse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouse)
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 FCFCDDCustomsWarehouse) 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 FCFCDDCustomsWarehouse
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 FCFCDDCustomsWarehouseSequenceNumber
'''
Item1
End Enum
Partial Public Class FCFCDDCustomsWarehouseCustomsAuthorisation
#Region "Private fields"
Private _warehouseOwner As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property WarehouseOwner() As String
Get
Return Me._warehouseOwner
End Get
Set
Me._warehouseOwner = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDCustomsWarehouseCustomsAuthorisation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDCustomsWarehouseCustomsAuthorisation 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 FCFCDDCustomsWarehouseCustomsAuthorisation object
'''
''' string workflow markup to deserialize
''' Output FCFCDDCustomsWarehouseCustomsAuthorisation 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 FCFCDDCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseCustomsAuthorisation)
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 FCFCDDCustomsWarehouseCustomsAuthorisation) 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 FCFCDDCustomsWarehouseCustomsAuthorisation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDCustomsWarehouseCustomsAuthorisation)
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 FCFCDDCustomsWarehouseCustomsAuthorisation
Return CType(Serializer.Deserialize(s), FCFCDDCustomsWarehouseCustomsAuthorisation)
End Function
#End Region
'''
''' Serializes current FCFCDDCustomsWarehouseCustomsAuthorisation 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 FCFCDDCustomsWarehouseCustomsAuthorisation object
'''
''' string xml file to load and deserialize
''' Output FCFCDDCustomsWarehouseCustomsAuthorisation 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 FCFCDDCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseCustomsAuthorisation)
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 FCFCDDCustomsWarehouseCustomsAuthorisation) 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 FCFCDDCustomsWarehouseCustomsAuthorisation
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 FCFCDDCustomsWarehouseGoodsItem
#Region "Private fields"
Private _sequenceNumber As String
Private _referencedRegistrationNumber As String
Private _referencedSequenceNumber As String
Private _accessViaAtlasFlag As String
Private _commodityCode As String
Private _usualProcessingFlag As String
Private _complement As String
Private _commercialAmount As FCFCDDCustomsWarehouseGoodsItemCommercialAmount
Private _debitAmount As FCFCDDCustomsWarehouseGoodsItemDebitAmount
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._debitAmount = New FCFCDDCustomsWarehouseGoodsItemDebitAmount()
Me._commercialAmount = New FCFCDDCustomsWarehouseGoodsItemCommercialAmount()
End Sub
Public Property SequenceNumber() As String
Get
Return Me._sequenceNumber
End Get
Set
Me._sequenceNumber = Value
End Set
End Property
Public Property ReferencedRegistrationNumber() As String
Get
Return Me._referencedRegistrationNumber
End Get
Set
Me._referencedRegistrationNumber = Value
End Set
End Property
Public Property ReferencedSequenceNumber() As String
Get
Return Me._referencedSequenceNumber
End Get
Set
Me._referencedSequenceNumber = Value
End Set
End Property
Public Property AccessViaAtlasFlag() As String
Get
Return Me._accessViaAtlasFlag
End Get
Set
Me._accessViaAtlasFlag = Value
End Set
End Property
Public Property CommodityCode() As String
Get
Return Me._commodityCode
End Get
Set
Me._commodityCode = Value
End Set
End Property
Public Property UsualProcessingFlag() As String
Get
Return Me._usualProcessingFlag
End Get
Set
Me._usualProcessingFlag = Value
End Set
End Property
Public Property Complement() As String
Get
Return Me._complement
End Get
Set
Me._complement = Value
End Set
End Property
Public Property CommercialAmount() As FCFCDDCustomsWarehouseGoodsItemCommercialAmount
Get
Return Me._commercialAmount
End Get
Set
Me._commercialAmount = Value
End Set
End Property
Public Property DebitAmount() As FCFCDDCustomsWarehouseGoodsItemDebitAmount
Get
Return Me._debitAmount
End Get
Set
Me._debitAmount = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDCustomsWarehouseGoodsItem))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDCustomsWarehouseGoodsItem 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 FCFCDDCustomsWarehouseGoodsItem object
'''
''' string workflow markup to deserialize
''' Output FCFCDDCustomsWarehouseGoodsItem 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 FCFCDDCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseGoodsItem)
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 FCFCDDCustomsWarehouseGoodsItem) 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 FCFCDDCustomsWarehouseGoodsItem
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDCustomsWarehouseGoodsItem)
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 FCFCDDCustomsWarehouseGoodsItem
Return CType(Serializer.Deserialize(s), FCFCDDCustomsWarehouseGoodsItem)
End Function
#End Region
'''
''' Serializes current FCFCDDCustomsWarehouseGoodsItem 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 FCFCDDCustomsWarehouseGoodsItem object
'''
''' string xml file to load and deserialize
''' Output FCFCDDCustomsWarehouseGoodsItem 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 FCFCDDCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseGoodsItem)
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 FCFCDDCustomsWarehouseGoodsItem) 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 FCFCDDCustomsWarehouseGoodsItem
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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount
#Region "Private fields"
Private _quantity As Decimal
Private _measurementUnit As String
Private _qualifier As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Quantity() As Decimal
Get
Return Me._quantity
End Get
Set
Me._quantity = Value
End Set
End Property
Public Property MeasurementUnit() As String
Get
Return Me._measurementUnit
End Get
Set
Me._measurementUnit = Value
End Set
End Property
Public Property Qualifier() As String
Get
Return Me._qualifier
End Get
Set
Me._qualifier = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDCustomsWarehouseGoodsItemCommercialAmount))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount object
'''
''' string workflow markup to deserialize
''' Output FCFCDDCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseGoodsItemCommercialAmount)
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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDCustomsWarehouseGoodsItemCommercialAmount)
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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount
Return CType(Serializer.Deserialize(s), FCFCDDCustomsWarehouseGoodsItemCommercialAmount)
End Function
#End Region
'''
''' Serializes current FCFCDDCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount object
'''
''' string xml file to load and deserialize
''' Output FCFCDDCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseGoodsItemCommercialAmount)
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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDDCustomsWarehouseGoodsItemCommercialAmount
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 FCFCDDCustomsWarehouseGoodsItemDebitAmount
#Region "Private fields"
Private _quantity As Decimal
Private _measurementUnit As String
Private _qualifier As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Quantity() As Decimal
Get
Return Me._quantity
End Get
Set
Me._quantity = Value
End Set
End Property
Public Property MeasurementUnit() As String
Get
Return Me._measurementUnit
End Get
Set
Me._measurementUnit = Value
End Set
End Property
Public Property Qualifier() As String
Get
Return Me._qualifier
End Get
Set
Me._qualifier = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDCustomsWarehouseGoodsItemDebitAmount))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDCustomsWarehouseGoodsItemDebitAmount 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 FCFCDDCustomsWarehouseGoodsItemDebitAmount object
'''
''' string workflow markup to deserialize
''' Output FCFCDDCustomsWarehouseGoodsItemDebitAmount 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 FCFCDDCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseGoodsItemDebitAmount)
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 FCFCDDCustomsWarehouseGoodsItemDebitAmount) 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 FCFCDDCustomsWarehouseGoodsItemDebitAmount
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDCustomsWarehouseGoodsItemDebitAmount)
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 FCFCDDCustomsWarehouseGoodsItemDebitAmount
Return CType(Serializer.Deserialize(s), FCFCDDCustomsWarehouseGoodsItemDebitAmount)
End Function
#End Region
'''
''' Serializes current FCFCDDCustomsWarehouseGoodsItemDebitAmount 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 FCFCDDCustomsWarehouseGoodsItemDebitAmount object
'''
''' string xml file to load and deserialize
''' Output FCFCDDCustomsWarehouseGoodsItemDebitAmount 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 FCFCDDCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDCustomsWarehouseGoodsItemDebitAmount)
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 FCFCDDCustomsWarehouseGoodsItemDebitAmount) 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 FCFCDDCustomsWarehouseGoodsItemDebitAmount
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 FCFCDDInwardProcessing
#Region "Private fields"
Private _sequenceNumber As FCFCDDInwardProcessingSequenceNumber
Private _goodsItemQuantity As String
Private _customsAuthorisation As FCFCDDInwardProcessingCustomsAuthorisation
Private _simplifiedGrantAuthorisationFlag As String
Private _monitoringCustomsOffice As FCFCDDInwardProcessingMonitoringCustomsOffice
Private _goodsItem As List(Of FCFCDDInwardProcessingGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDDInwardProcessingGoodsItem)()
Me._monitoringCustomsOffice = New FCFCDDInwardProcessingMonitoringCustomsOffice()
Me._customsAuthorisation = New FCFCDDInwardProcessingCustomsAuthorisation()
End Sub
Public Property SequenceNumber() As FCFCDDInwardProcessingSequenceNumber
Get
Return Me._sequenceNumber
End Get
Set
Me._sequenceNumber = Value
End Set
End Property
Public Property GoodsItemQuantity() As String
Get
Return Me._goodsItemQuantity
End Get
Set
Me._goodsItemQuantity = Value
End Set
End Property
Public Property CustomsAuthorisation() As FCFCDDInwardProcessingCustomsAuthorisation
Get
Return Me._customsAuthorisation
End Get
Set
Me._customsAuthorisation = Value
End Set
End Property
Public Property SimplifiedGrantAuthorisationFlag() As String
Get
Return Me._simplifiedGrantAuthorisationFlag
End Get
Set
Me._simplifiedGrantAuthorisationFlag = Value
End Set
End Property
Public Property MonitoringCustomsOffice() As FCFCDDInwardProcessingMonitoringCustomsOffice
Get
Return Me._monitoringCustomsOffice
End Get
Set
Me._monitoringCustomsOffice = Value
End Set
End Property
Public Property GoodsItem() As List(Of FCFCDDInwardProcessingGoodsItem)
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(FCFCDDInwardProcessing))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDInwardProcessing 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 FCFCDDInwardProcessing object
'''
''' string workflow markup to deserialize
''' Output FCFCDDInwardProcessing 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 FCFCDDInwardProcessing, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessing)
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 FCFCDDInwardProcessing) 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 FCFCDDInwardProcessing
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDInwardProcessing)
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 FCFCDDInwardProcessing
Return CType(Serializer.Deserialize(s), FCFCDDInwardProcessing)
End Function
#End Region
'''
''' Serializes current FCFCDDInwardProcessing 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 FCFCDDInwardProcessing object
'''
''' string xml file to load and deserialize
''' Output FCFCDDInwardProcessing 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 FCFCDDInwardProcessing, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessing)
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 FCFCDDInwardProcessing) 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 FCFCDDInwardProcessing
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 FCFCDDInwardProcessingSequenceNumber
'''
Item1
End Enum
Partial Public Class FCFCDDInwardProcessingCustomsAuthorisation
#Region "Private fields"
Private _processingOwner As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ProcessingOwner() As String
Get
Return Me._processingOwner
End Get
Set
Me._processingOwner = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDInwardProcessingCustomsAuthorisation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDInwardProcessingCustomsAuthorisation 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 FCFCDDInwardProcessingCustomsAuthorisation object
'''
''' string workflow markup to deserialize
''' Output FCFCDDInwardProcessingCustomsAuthorisation 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 FCFCDDInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingCustomsAuthorisation)
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 FCFCDDInwardProcessingCustomsAuthorisation) 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 FCFCDDInwardProcessingCustomsAuthorisation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDInwardProcessingCustomsAuthorisation)
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 FCFCDDInwardProcessingCustomsAuthorisation
Return CType(Serializer.Deserialize(s), FCFCDDInwardProcessingCustomsAuthorisation)
End Function
#End Region
'''
''' Serializes current FCFCDDInwardProcessingCustomsAuthorisation 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 FCFCDDInwardProcessingCustomsAuthorisation object
'''
''' string xml file to load and deserialize
''' Output FCFCDDInwardProcessingCustomsAuthorisation 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 FCFCDDInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingCustomsAuthorisation)
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 FCFCDDInwardProcessingCustomsAuthorisation) 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 FCFCDDInwardProcessingCustomsAuthorisation
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 FCFCDDInwardProcessingMonitoringCustomsOffice
#Region "Private fields"
Private _identification As FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification()
End Sub
Public Property Identification() As FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDInwardProcessingMonitoringCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDInwardProcessingMonitoringCustomsOffice 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 FCFCDDInwardProcessingMonitoringCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output FCFCDDInwardProcessingMonitoringCustomsOffice 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 FCFCDDInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingMonitoringCustomsOffice)
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 FCFCDDInwardProcessingMonitoringCustomsOffice) 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 FCFCDDInwardProcessingMonitoringCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDInwardProcessingMonitoringCustomsOffice)
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 FCFCDDInwardProcessingMonitoringCustomsOffice
Return CType(Serializer.Deserialize(s), FCFCDDInwardProcessingMonitoringCustomsOffice)
End Function
#End Region
'''
''' Serializes current FCFCDDInwardProcessingMonitoringCustomsOffice 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 FCFCDDInwardProcessingMonitoringCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output FCFCDDInwardProcessingMonitoringCustomsOffice 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 FCFCDDInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingMonitoringCustomsOffice)
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 FCFCDDInwardProcessingMonitoringCustomsOffice) 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 FCFCDDInwardProcessingMonitoringCustomsOffice
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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification)
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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification)
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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification
Return CType(Serializer.Deserialize(s), FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification)
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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDDInwardProcessingMonitoringCustomsOfficeIdentification
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 FCFCDDInwardProcessingGoodsItem
#Region "Private fields"
Private _sequenceNumber As String
Private _referencedRegistrationNumber As String
Private _referencedSequenceNumber As String
Private _accessViaAtlasFlag As String
Private _goodsRelatedInformation As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property SequenceNumber() As String
Get
Return Me._sequenceNumber
End Get
Set
Me._sequenceNumber = Value
End Set
End Property
Public Property ReferencedRegistrationNumber() As String
Get
Return Me._referencedRegistrationNumber
End Get
Set
Me._referencedRegistrationNumber = Value
End Set
End Property
Public Property ReferencedSequenceNumber() As String
Get
Return Me._referencedSequenceNumber
End Get
Set
Me._referencedSequenceNumber = Value
End Set
End Property
Public Property AccessViaAtlasFlag() As String
Get
Return Me._accessViaAtlasFlag
End Get
Set
Me._accessViaAtlasFlag = Value
End Set
End Property
Public Property GoodsRelatedInformation() As String
Get
Return Me._goodsRelatedInformation
End Get
Set
Me._goodsRelatedInformation = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDInwardProcessingGoodsItem))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDInwardProcessingGoodsItem 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 FCFCDDInwardProcessingGoodsItem object
'''
''' string workflow markup to deserialize
''' Output FCFCDDInwardProcessingGoodsItem 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 FCFCDDInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingGoodsItem)
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 FCFCDDInwardProcessingGoodsItem) 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 FCFCDDInwardProcessingGoodsItem
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDInwardProcessingGoodsItem)
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 FCFCDDInwardProcessingGoodsItem
Return CType(Serializer.Deserialize(s), FCFCDDInwardProcessingGoodsItem)
End Function
#End Region
'''
''' Serializes current FCFCDDInwardProcessingGoodsItem 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 FCFCDDInwardProcessingGoodsItem object
'''
''' string xml file to load and deserialize
''' Output FCFCDDInwardProcessingGoodsItem 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 FCFCDDInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDInwardProcessingGoodsItem)
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 FCFCDDInwardProcessingGoodsItem) 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 FCFCDDInwardProcessingGoodsItem
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 FCFCDDBody
#Region "Private fields"
Private _customsValueFlag As String
Private _consignor As FCFCDDBodyConsignor
Private _consignee As FCFCDDBodyConsignee
Private _acquirer As FCFCDDBodyAcquirer
Private _containers As FCFCDDBodyContainers
Private _deliveryTerms As FCFCDDBodyDeliveryTerms
Private _paymentTransaction As FCFCDDBodyPaymentTransaction
Private _foreignTradeStatistics As FCFCDDBodyForeignTradeStatistics
Private _customsValue As FCFCDDBodyCustomsValue
Private _document As List(Of FCFCDDBodyDocument)
Private _goodsItem As List(Of FCFCDDBodyGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDDBodyGoodsItem)()
Me._document = New List(Of FCFCDDBodyDocument)()
Me._customsValue = New FCFCDDBodyCustomsValue()
Me._foreignTradeStatistics = New FCFCDDBodyForeignTradeStatistics()
Me._paymentTransaction = New FCFCDDBodyPaymentTransaction()
Me._deliveryTerms = New FCFCDDBodyDeliveryTerms()
Me._containers = New FCFCDDBodyContainers()
Me._acquirer = New FCFCDDBodyAcquirer()
Me._consignee = New FCFCDDBodyConsignee()
Me._consignor = New FCFCDDBodyConsignor()
End Sub
Public Property CustomsValueFlag() As String
Get
Return Me._customsValueFlag
End Get
Set
Me._customsValueFlag = Value
End Set
End Property
Public Property Consignor() As FCFCDDBodyConsignor
Get
Return Me._consignor
End Get
Set
Me._consignor = Value
End Set
End Property
Public Property Consignee() As FCFCDDBodyConsignee
Get
Return Me._consignee
End Get
Set
Me._consignee = Value
End Set
End Property
Public Property Acquirer() As FCFCDDBodyAcquirer
Get
Return Me._acquirer
End Get
Set
Me._acquirer = Value
End Set
End Property
Public Property Containers() As FCFCDDBodyContainers
Get
Return Me._containers
End Get
Set
Me._containers = Value
End Set
End Property
Public Property DeliveryTerms() As FCFCDDBodyDeliveryTerms
Get
Return Me._deliveryTerms
End Get
Set
Me._deliveryTerms = Value
End Set
End Property
Public Property PaymentTransaction() As FCFCDDBodyPaymentTransaction
Get
Return Me._paymentTransaction
End Get
Set
Me._paymentTransaction = Value
End Set
End Property
Public Property ForeignTradeStatistics() As FCFCDDBodyForeignTradeStatistics
Get
Return Me._foreignTradeStatistics
End Get
Set
Me._foreignTradeStatistics = Value
End Set
End Property
Public Property CustomsValue() As FCFCDDBodyCustomsValue
Get
Return Me._customsValue
End Get
Set
Me._customsValue = Value
End Set
End Property
Public Property Document() As List(Of FCFCDDBodyDocument)
Get
Return Me._document
End Get
Set
Me._document = Value
End Set
End Property
Public Property GoodsItem() As List(Of FCFCDDBodyGoodsItem)
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(FCFCDDBody))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBody 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 FCFCDDBody object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBody 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 FCFCDDBody, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBody)
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 FCFCDDBody) 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 FCFCDDBody
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBody)
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 FCFCDDBody
Return CType(Serializer.Deserialize(s), FCFCDDBody)
End Function
#End Region
'''
''' Serializes current FCFCDDBody 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 FCFCDDBody object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBody 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 FCFCDDBody, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBody)
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 FCFCDDBody) 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 FCFCDDBody
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 FCFCDDBodyConsignor
#Region "Private fields"
Private _identification As FCFCDDBodyConsignorIdentification
Private _name As String
Private _address As FCFCDDBodyConsignorAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDDBodyConsignorAddress()
Me._identification = New FCFCDDBodyConsignorIdentification()
End Sub
Public Property Identification() As FCFCDDBodyConsignorIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property Address() As FCFCDDBodyConsignorAddress
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(FCFCDDBodyConsignor))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyConsignor 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 FCFCDDBodyConsignor object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyConsignor 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 FCFCDDBodyConsignor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignor)
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 FCFCDDBodyConsignor) 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 FCFCDDBodyConsignor
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyConsignor)
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 FCFCDDBodyConsignor
Return CType(Serializer.Deserialize(s), FCFCDDBodyConsignor)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyConsignor 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 FCFCDDBodyConsignor object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyConsignor 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 FCFCDDBodyConsignor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignor)
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 FCFCDDBodyConsignor) 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 FCFCDDBodyConsignor
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 FCFCDDBodyConsignorIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyConsignorIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyConsignorIdentification 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 FCFCDDBodyConsignorIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyConsignorIdentification 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 FCFCDDBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignorIdentification)
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 FCFCDDBodyConsignorIdentification) 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 FCFCDDBodyConsignorIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyConsignorIdentification)
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 FCFCDDBodyConsignorIdentification
Return CType(Serializer.Deserialize(s), FCFCDDBodyConsignorIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyConsignorIdentification 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 FCFCDDBodyConsignorIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyConsignorIdentification 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 FCFCDDBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignorIdentification)
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 FCFCDDBodyConsignorIdentification) 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 FCFCDDBodyConsignorIdentification
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 FCFCDDBodyConsignorAddress
#Region "Private fields"
Private _line As String
Private _country As String
Private _postcode As String
Private _city As String
Private _district As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Line() As String
Get
Return Me._line
End Get
Set
Me._line = Value
End Set
End Property
Public Property Country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set
Me._postcode = Value
End Set
End Property
Public Property City() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property District() As String
Get
Return Me._district
End Get
Set
Me._district = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyConsignorAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyConsignorAddress 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 FCFCDDBodyConsignorAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyConsignorAddress 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 FCFCDDBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignorAddress)
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 FCFCDDBodyConsignorAddress) 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 FCFCDDBodyConsignorAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyConsignorAddress)
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 FCFCDDBodyConsignorAddress
Return CType(Serializer.Deserialize(s), FCFCDDBodyConsignorAddress)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyConsignorAddress 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 FCFCDDBodyConsignorAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyConsignorAddress 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 FCFCDDBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignorAddress)
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 FCFCDDBodyConsignorAddress) 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 FCFCDDBodyConsignorAddress
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 FCFCDDBodyConsignee
#Region "Private fields"
Private _identification As FCFCDDBodyConsigneeIdentification
Private _name As String
Private _address As FCFCDDBodyConsigneeAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDDBodyConsigneeAddress()
Me._identification = New FCFCDDBodyConsigneeIdentification()
End Sub
Public Property Identification() As FCFCDDBodyConsigneeIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property Address() As FCFCDDBodyConsigneeAddress
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(FCFCDDBodyConsignee))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyConsignee 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 FCFCDDBodyConsignee object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyConsignee 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 FCFCDDBodyConsignee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignee)
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 FCFCDDBodyConsignee) 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 FCFCDDBodyConsignee
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyConsignee)
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 FCFCDDBodyConsignee
Return CType(Serializer.Deserialize(s), FCFCDDBodyConsignee)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyConsignee 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 FCFCDDBodyConsignee object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyConsignee 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 FCFCDDBodyConsignee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsignee)
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 FCFCDDBodyConsignee) 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 FCFCDDBodyConsignee
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 FCFCDDBodyConsigneeIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyConsigneeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyConsigneeIdentification 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 FCFCDDBodyConsigneeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyConsigneeIdentification 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 FCFCDDBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsigneeIdentification)
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 FCFCDDBodyConsigneeIdentification) 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 FCFCDDBodyConsigneeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyConsigneeIdentification)
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 FCFCDDBodyConsigneeIdentification
Return CType(Serializer.Deserialize(s), FCFCDDBodyConsigneeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyConsigneeIdentification 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 FCFCDDBodyConsigneeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyConsigneeIdentification 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 FCFCDDBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsigneeIdentification)
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 FCFCDDBodyConsigneeIdentification) 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 FCFCDDBodyConsigneeIdentification
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 FCFCDDBodyConsigneeAddress
#Region "Private fields"
Private _line As String
Private _country As String
Private _postcode As String
Private _city As String
Private _district As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Line() As String
Get
Return Me._line
End Get
Set
Me._line = Value
End Set
End Property
Public Property Country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set
Me._postcode = Value
End Set
End Property
Public Property City() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property District() As String
Get
Return Me._district
End Get
Set
Me._district = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyConsigneeAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyConsigneeAddress 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 FCFCDDBodyConsigneeAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyConsigneeAddress 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 FCFCDDBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsigneeAddress)
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 FCFCDDBodyConsigneeAddress) 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 FCFCDDBodyConsigneeAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyConsigneeAddress)
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 FCFCDDBodyConsigneeAddress
Return CType(Serializer.Deserialize(s), FCFCDDBodyConsigneeAddress)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyConsigneeAddress 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 FCFCDDBodyConsigneeAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyConsigneeAddress 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 FCFCDDBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyConsigneeAddress)
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 FCFCDDBodyConsigneeAddress) 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 FCFCDDBodyConsigneeAddress
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 FCFCDDBodyAcquirer
#Region "Private fields"
Private _identification As FCFCDDBodyAcquirerIdentification
Private _name As String
Private _taxNumber As String
Private _address As FCFCDDBodyAcquirerAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDDBodyAcquirerAddress()
Me._identification = New FCFCDDBodyAcquirerIdentification()
End Sub
Public Property Identification() As FCFCDDBodyAcquirerIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property TaxNumber() As String
Get
Return Me._taxNumber
End Get
Set
Me._taxNumber = Value
End Set
End Property
Public Property Address() As FCFCDDBodyAcquirerAddress
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(FCFCDDBodyAcquirer))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyAcquirer 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 FCFCDDBodyAcquirer object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyAcquirer 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 FCFCDDBodyAcquirer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyAcquirer)
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 FCFCDDBodyAcquirer) 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 FCFCDDBodyAcquirer
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyAcquirer)
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 FCFCDDBodyAcquirer
Return CType(Serializer.Deserialize(s), FCFCDDBodyAcquirer)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyAcquirer 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 FCFCDDBodyAcquirer object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyAcquirer 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 FCFCDDBodyAcquirer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyAcquirer)
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 FCFCDDBodyAcquirer) 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 FCFCDDBodyAcquirer
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 FCFCDDBodyAcquirerIdentification
#Region "Private fields"
Private _referenceNumber As String
Private _subsidiaryNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Public Property SubsidiaryNumber() As String
Get
Return Me._subsidiaryNumber
End Get
Set
Me._subsidiaryNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyAcquirerIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyAcquirerIdentification 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 FCFCDDBodyAcquirerIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyAcquirerIdentification 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 FCFCDDBodyAcquirerIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyAcquirerIdentification)
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 FCFCDDBodyAcquirerIdentification) 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 FCFCDDBodyAcquirerIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyAcquirerIdentification)
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 FCFCDDBodyAcquirerIdentification
Return CType(Serializer.Deserialize(s), FCFCDDBodyAcquirerIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyAcquirerIdentification 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 FCFCDDBodyAcquirerIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyAcquirerIdentification 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 FCFCDDBodyAcquirerIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyAcquirerIdentification)
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 FCFCDDBodyAcquirerIdentification) 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 FCFCDDBodyAcquirerIdentification
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 FCFCDDBodyAcquirerAddress
#Region "Private fields"
Private _line As String
Private _country As String
Private _postcode As String
Private _city As String
Private _district As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Line() As String
Get
Return Me._line
End Get
Set
Me._line = Value
End Set
End Property
Public Property Country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set
Me._postcode = Value
End Set
End Property
Public Property City() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property District() As String
Get
Return Me._district
End Get
Set
Me._district = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyAcquirerAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyAcquirerAddress 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 FCFCDDBodyAcquirerAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyAcquirerAddress 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 FCFCDDBodyAcquirerAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyAcquirerAddress)
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 FCFCDDBodyAcquirerAddress) 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 FCFCDDBodyAcquirerAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyAcquirerAddress)
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 FCFCDDBodyAcquirerAddress
Return CType(Serializer.Deserialize(s), FCFCDDBodyAcquirerAddress)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyAcquirerAddress 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 FCFCDDBodyAcquirerAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyAcquirerAddress 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 FCFCDDBodyAcquirerAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyAcquirerAddress)
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 FCFCDDBodyAcquirerAddress) 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 FCFCDDBodyAcquirerAddress
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 FCFCDDBodyContainers
#Region "Private fields"
Private _containerFlag As String
Private _container As List(Of FCFCDDBodyContainersContainer)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._container = New List(Of FCFCDDBodyContainersContainer)()
End Sub
Public Property ContainerFlag() As String
Get
Return Me._containerFlag
End Get
Set
Me._containerFlag = Value
End Set
End Property
Public Property Container() As List(Of FCFCDDBodyContainersContainer)
Get
Return Me._container
End Get
Set
Me._container = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyContainers))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyContainers 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 FCFCDDBodyContainers object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyContainers 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 FCFCDDBodyContainers, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyContainers)
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 FCFCDDBodyContainers) 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 FCFCDDBodyContainers
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyContainers)
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 FCFCDDBodyContainers
Return CType(Serializer.Deserialize(s), FCFCDDBodyContainers)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyContainers 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 FCFCDDBodyContainers object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyContainers 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 FCFCDDBodyContainers, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyContainers)
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 FCFCDDBodyContainers) 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 FCFCDDBodyContainers
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 FCFCDDBodyContainersContainer
#Region "Private fields"
Private _identificationNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property IdentificationNumber() As String
Get
Return Me._identificationNumber
End Get
Set
Me._identificationNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyContainersContainer))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyContainersContainer 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 FCFCDDBodyContainersContainer object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyContainersContainer 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 FCFCDDBodyContainersContainer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyContainersContainer)
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 FCFCDDBodyContainersContainer) 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 FCFCDDBodyContainersContainer
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyContainersContainer)
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 FCFCDDBodyContainersContainer
Return CType(Serializer.Deserialize(s), FCFCDDBodyContainersContainer)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyContainersContainer 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 FCFCDDBodyContainersContainer object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyContainersContainer 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 FCFCDDBodyContainersContainer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyContainersContainer)
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 FCFCDDBodyContainersContainer) 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 FCFCDDBodyContainersContainer
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 FCFCDDBodyDeliveryTerms
#Region "Private fields"
Private _code As String
Private _description As String
Private _place As String
Private _key As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Code() As String
Get
Return Me._code
End Get
Set
Me._code = 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 Place() As String
Get
Return Me._place
End Get
Set
Me._place = Value
End Set
End Property
Public Property Key() As String
Get
Return Me._key
End Get
Set
Me._key = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyDeliveryTerms))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyDeliveryTerms 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 FCFCDDBodyDeliveryTerms object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyDeliveryTerms 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 FCFCDDBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyDeliveryTerms)
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 FCFCDDBodyDeliveryTerms) 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 FCFCDDBodyDeliveryTerms
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyDeliveryTerms)
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 FCFCDDBodyDeliveryTerms
Return CType(Serializer.Deserialize(s), FCFCDDBodyDeliveryTerms)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyDeliveryTerms 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 FCFCDDBodyDeliveryTerms object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyDeliveryTerms 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 FCFCDDBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyDeliveryTerms)
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 FCFCDDBodyDeliveryTerms) 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 FCFCDDBodyDeliveryTerms
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 FCFCDDBodyPaymentTransaction
#Region "Private fields"
Private _amount As Decimal
Private _currencyCode As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Amount() As Decimal
Get
Return Me._amount
End Get
Set
Me._amount = Value
End Set
End Property
Public Property CurrencyCode() As String
Get
Return Me._currencyCode
End Get
Set
Me._currencyCode = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyPaymentTransaction))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyPaymentTransaction 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 FCFCDDBodyPaymentTransaction object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyPaymentTransaction 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 FCFCDDBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyPaymentTransaction)
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 FCFCDDBodyPaymentTransaction) 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 FCFCDDBodyPaymentTransaction
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyPaymentTransaction)
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 FCFCDDBodyPaymentTransaction
Return CType(Serializer.Deserialize(s), FCFCDDBodyPaymentTransaction)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyPaymentTransaction 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 FCFCDDBodyPaymentTransaction object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyPaymentTransaction 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 FCFCDDBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyPaymentTransaction)
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 FCFCDDBodyPaymentTransaction) 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 FCFCDDBodyPaymentTransaction
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 FCFCDDBodyForeignTradeStatistics
#Region "Private fields"
Private _goodsStatus As String
Private _transactionType As String
Private _destinationCountry As String
Private _destinationFederalState As String
Private _inlandTransportMode As String
Private _totalGrossMassMeasure As Decimal
Private _entryCustomsOffice As FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._entryCustomsOffice = New FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice()
End Sub
Public Property GoodsStatus() As String
Get
Return Me._goodsStatus
End Get
Set
Me._goodsStatus = Value
End Set
End Property
Public Property TransactionType() As String
Get
Return Me._transactionType
End Get
Set
Me._transactionType = 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 DestinationFederalState() As String
Get
Return Me._destinationFederalState
End Get
Set
Me._destinationFederalState = Value
End Set
End Property
Public Property InlandTransportMode() As String
Get
Return Me._inlandTransportMode
End Get
Set
Me._inlandTransportMode = Value
End Set
End Property
Public Property TotalGrossMassMeasure() As Decimal
Get
Return Me._totalGrossMassMeasure
End Get
Set
Me._totalGrossMassMeasure = Value
End Set
End Property
Public Property EntryCustomsOffice() As FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice
Get
Return Me._entryCustomsOffice
End Get
Set
Me._entryCustomsOffice = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyForeignTradeStatistics))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyForeignTradeStatistics 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 FCFCDDBodyForeignTradeStatistics object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyForeignTradeStatistics 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 FCFCDDBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyForeignTradeStatistics)
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 FCFCDDBodyForeignTradeStatistics) 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 FCFCDDBodyForeignTradeStatistics
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyForeignTradeStatistics)
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 FCFCDDBodyForeignTradeStatistics
Return CType(Serializer.Deserialize(s), FCFCDDBodyForeignTradeStatistics)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyForeignTradeStatistics 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 FCFCDDBodyForeignTradeStatistics object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyForeignTradeStatistics 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 FCFCDDBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyForeignTradeStatistics)
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 FCFCDDBodyForeignTradeStatistics) 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 FCFCDDBodyForeignTradeStatistics
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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice)
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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice)
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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice
Return CType(Serializer.Deserialize(s), FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice)
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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDDBodyForeignTradeStatisticsEntryCustomsOffice
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 FCFCDDBodyCustomsValue
#Region "Private fields"
Private _formerDecisions As String
Private _vendor As FCFCDDBodyCustomsValueVendor
Private _vendee As FCFCDDBodyCustomsValueVendee
Private _affiliation As FCFCDDBodyCustomsValueAffiliation
Private _restrictionOrCondition As FCFCDDBodyCustomsValueRestrictionOrCondition
Private _licenseFee As FCFCDDBodyCustomsValueLicenseFee
Private _resale As FCFCDDBodyCustomsValueResale
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._resale = New FCFCDDBodyCustomsValueResale()
Me._licenseFee = New FCFCDDBodyCustomsValueLicenseFee()
Me._restrictionOrCondition = New FCFCDDBodyCustomsValueRestrictionOrCondition()
Me._affiliation = New FCFCDDBodyCustomsValueAffiliation()
Me._vendee = New FCFCDDBodyCustomsValueVendee()
Me._vendor = New FCFCDDBodyCustomsValueVendor()
End Sub
Public Property FormerDecisions() As String
Get
Return Me._formerDecisions
End Get
Set
Me._formerDecisions = Value
End Set
End Property
Public Property Vendor() As FCFCDDBodyCustomsValueVendor
Get
Return Me._vendor
End Get
Set
Me._vendor = Value
End Set
End Property
Public Property Vendee() As FCFCDDBodyCustomsValueVendee
Get
Return Me._vendee
End Get
Set
Me._vendee = Value
End Set
End Property
Public Property Affiliation() As FCFCDDBodyCustomsValueAffiliation
Get
Return Me._affiliation
End Get
Set
Me._affiliation = Value
End Set
End Property
Public Property RestrictionOrCondition() As FCFCDDBodyCustomsValueRestrictionOrCondition
Get
Return Me._restrictionOrCondition
End Get
Set
Me._restrictionOrCondition = Value
End Set
End Property
Public Property LicenseFee() As FCFCDDBodyCustomsValueLicenseFee
Get
Return Me._licenseFee
End Get
Set
Me._licenseFee = Value
End Set
End Property
Public Property Resale() As FCFCDDBodyCustomsValueResale
Get
Return Me._resale
End Get
Set
Me._resale = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValue))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValue 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 FCFCDDBodyCustomsValue object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValue 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 FCFCDDBodyCustomsValue, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValue)
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 FCFCDDBodyCustomsValue) 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 FCFCDDBodyCustomsValue
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValue)
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 FCFCDDBodyCustomsValue
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValue)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValue 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 FCFCDDBodyCustomsValue object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValue 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 FCFCDDBodyCustomsValue, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValue)
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 FCFCDDBodyCustomsValue) 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 FCFCDDBodyCustomsValue
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 FCFCDDBodyCustomsValueVendor
#Region "Private fields"
Private _identification As FCFCDDBodyCustomsValueVendorIdentification
Private _name As String
Private _address As FCFCDDBodyCustomsValueVendorAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDDBodyCustomsValueVendorAddress()
Me._identification = New FCFCDDBodyCustomsValueVendorIdentification()
End Sub
Public Property Identification() As FCFCDDBodyCustomsValueVendorIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property Address() As FCFCDDBodyCustomsValueVendorAddress
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(FCFCDDBodyCustomsValueVendor))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueVendor 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 FCFCDDBodyCustomsValueVendor object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueVendor 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 FCFCDDBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendor)
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 FCFCDDBodyCustomsValueVendor) 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 FCFCDDBodyCustomsValueVendor
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueVendor)
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 FCFCDDBodyCustomsValueVendor
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueVendor)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueVendor 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 FCFCDDBodyCustomsValueVendor object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueVendor 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 FCFCDDBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendor)
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 FCFCDDBodyCustomsValueVendor) 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 FCFCDDBodyCustomsValueVendor
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 FCFCDDBodyCustomsValueVendorIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueVendorIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueVendorIdentification 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 FCFCDDBodyCustomsValueVendorIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueVendorIdentification 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 FCFCDDBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendorIdentification)
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 FCFCDDBodyCustomsValueVendorIdentification) 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 FCFCDDBodyCustomsValueVendorIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueVendorIdentification)
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 FCFCDDBodyCustomsValueVendorIdentification
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueVendorIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueVendorIdentification 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 FCFCDDBodyCustomsValueVendorIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueVendorIdentification 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 FCFCDDBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendorIdentification)
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 FCFCDDBodyCustomsValueVendorIdentification) 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 FCFCDDBodyCustomsValueVendorIdentification
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 FCFCDDBodyCustomsValueVendorAddress
#Region "Private fields"
Private _line As String
Private _country As String
Private _postcode As String
Private _city As String
Private _district As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Line() As String
Get
Return Me._line
End Get
Set
Me._line = Value
End Set
End Property
Public Property Country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set
Me._postcode = Value
End Set
End Property
Public Property City() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property District() As String
Get
Return Me._district
End Get
Set
Me._district = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueVendorAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueVendorAddress 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 FCFCDDBodyCustomsValueVendorAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueVendorAddress 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 FCFCDDBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendorAddress)
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 FCFCDDBodyCustomsValueVendorAddress) 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 FCFCDDBodyCustomsValueVendorAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueVendorAddress)
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 FCFCDDBodyCustomsValueVendorAddress
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueVendorAddress)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueVendorAddress 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 FCFCDDBodyCustomsValueVendorAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueVendorAddress 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 FCFCDDBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendorAddress)
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 FCFCDDBodyCustomsValueVendorAddress) 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 FCFCDDBodyCustomsValueVendorAddress
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 FCFCDDBodyCustomsValueVendee
#Region "Private fields"
Private _identification As FCFCDDBodyCustomsValueVendeeIdentification
Private _name As String
Private _address As FCFCDDBodyCustomsValueVendeeAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDDBodyCustomsValueVendeeAddress()
Me._identification = New FCFCDDBodyCustomsValueVendeeIdentification()
End Sub
Public Property Identification() As FCFCDDBodyCustomsValueVendeeIdentification
Get
Return Me._identification
End Get
Set
Me._identification = Value
End Set
End Property
Public Property Name() As String
Get
Return Me._name
End Get
Set
Me._name = Value
End Set
End Property
Public Property Address() As FCFCDDBodyCustomsValueVendeeAddress
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(FCFCDDBodyCustomsValueVendee))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueVendee 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 FCFCDDBodyCustomsValueVendee object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueVendee 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 FCFCDDBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendee)
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 FCFCDDBodyCustomsValueVendee) 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 FCFCDDBodyCustomsValueVendee
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueVendee)
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 FCFCDDBodyCustomsValueVendee
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueVendee)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueVendee 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 FCFCDDBodyCustomsValueVendee object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueVendee 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 FCFCDDBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendee)
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 FCFCDDBodyCustomsValueVendee) 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 FCFCDDBodyCustomsValueVendee
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 FCFCDDBodyCustomsValueVendeeIdentification
#Region "Private fields"
Private _referenceNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueVendeeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueVendeeIdentification 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 FCFCDDBodyCustomsValueVendeeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueVendeeIdentification 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 FCFCDDBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendeeIdentification)
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 FCFCDDBodyCustomsValueVendeeIdentification) 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 FCFCDDBodyCustomsValueVendeeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueVendeeIdentification)
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 FCFCDDBodyCustomsValueVendeeIdentification
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueVendeeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueVendeeIdentification 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 FCFCDDBodyCustomsValueVendeeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueVendeeIdentification 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 FCFCDDBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendeeIdentification)
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 FCFCDDBodyCustomsValueVendeeIdentification) 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 FCFCDDBodyCustomsValueVendeeIdentification
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 FCFCDDBodyCustomsValueVendeeAddress
#Region "Private fields"
Private _line As String
Private _country As String
Private _postcode As String
Private _city As String
Private _district As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Line() As String
Get
Return Me._line
End Get
Set
Me._line = Value
End Set
End Property
Public Property Country() As String
Get
Return Me._country
End Get
Set
Me._country = Value
End Set
End Property
Public Property Postcode() As String
Get
Return Me._postcode
End Get
Set
Me._postcode = Value
End Set
End Property
Public Property City() As String
Get
Return Me._city
End Get
Set
Me._city = Value
End Set
End Property
Public Property District() As String
Get
Return Me._district
End Get
Set
Me._district = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueVendeeAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueVendeeAddress 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 FCFCDDBodyCustomsValueVendeeAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueVendeeAddress 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 FCFCDDBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendeeAddress)
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 FCFCDDBodyCustomsValueVendeeAddress) 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 FCFCDDBodyCustomsValueVendeeAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueVendeeAddress)
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 FCFCDDBodyCustomsValueVendeeAddress
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueVendeeAddress)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueVendeeAddress 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 FCFCDDBodyCustomsValueVendeeAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueVendeeAddress 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 FCFCDDBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueVendeeAddress)
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 FCFCDDBodyCustomsValueVendeeAddress) 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 FCFCDDBodyCustomsValueVendeeAddress
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 FCFCDDBodyCustomsValueAffiliation
#Region "Private fields"
Private _type As String
Private _description As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Type() As String
Get
Return Me._type
End Get
Set
Me._type = Value
End Set
End Property
Public Property Description() As String
Get
Return Me._description
End Get
Set
Me._description = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueAffiliation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueAffiliation 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 FCFCDDBodyCustomsValueAffiliation object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueAffiliation 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 FCFCDDBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueAffiliation)
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 FCFCDDBodyCustomsValueAffiliation) 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 FCFCDDBodyCustomsValueAffiliation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueAffiliation)
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 FCFCDDBodyCustomsValueAffiliation
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueAffiliation)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueAffiliation 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 FCFCDDBodyCustomsValueAffiliation object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueAffiliation 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 FCFCDDBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueAffiliation)
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 FCFCDDBodyCustomsValueAffiliation) 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 FCFCDDBodyCustomsValueAffiliation
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 FCFCDDBodyCustomsValueRestrictionOrCondition
#Region "Private fields"
Private _restrictionFlag As String
Private _conditionFlag As String
Private _description As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property RestrictionFlag() As String
Get
Return Me._restrictionFlag
End Get
Set
Me._restrictionFlag = Value
End Set
End Property
Public Property ConditionFlag() As String
Get
Return Me._conditionFlag
End Get
Set
Me._conditionFlag = Value
End Set
End Property
Public Property Description() As String
Get
Return Me._description
End Get
Set
Me._description = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueRestrictionOrCondition))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueRestrictionOrCondition 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 FCFCDDBodyCustomsValueRestrictionOrCondition object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueRestrictionOrCondition 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 FCFCDDBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueRestrictionOrCondition)
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 FCFCDDBodyCustomsValueRestrictionOrCondition) 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 FCFCDDBodyCustomsValueRestrictionOrCondition
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueRestrictionOrCondition)
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 FCFCDDBodyCustomsValueRestrictionOrCondition
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueRestrictionOrCondition)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueRestrictionOrCondition 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 FCFCDDBodyCustomsValueRestrictionOrCondition object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueRestrictionOrCondition 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 FCFCDDBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueRestrictionOrCondition)
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 FCFCDDBodyCustomsValueRestrictionOrCondition) 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 FCFCDDBodyCustomsValueRestrictionOrCondition
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 FCFCDDBodyCustomsValueLicenseFee
#Region "Private fields"
Private _licenseFeeFlag As String
Private _description As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property LicenseFeeFlag() As String
Get
Return Me._licenseFeeFlag
End Get
Set
Me._licenseFeeFlag = Value
End Set
End Property
Public Property Description() As String
Get
Return Me._description
End Get
Set
Me._description = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueLicenseFee))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueLicenseFee 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 FCFCDDBodyCustomsValueLicenseFee object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueLicenseFee 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 FCFCDDBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueLicenseFee)
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 FCFCDDBodyCustomsValueLicenseFee) 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 FCFCDDBodyCustomsValueLicenseFee
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueLicenseFee)
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 FCFCDDBodyCustomsValueLicenseFee
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueLicenseFee)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueLicenseFee 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 FCFCDDBodyCustomsValueLicenseFee object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueLicenseFee 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 FCFCDDBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueLicenseFee)
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 FCFCDDBodyCustomsValueLicenseFee) 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 FCFCDDBodyCustomsValueLicenseFee
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 FCFCDDBodyCustomsValueResale
#Region "Private fields"
Private _resaleFlag As String
Private _description As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property ResaleFlag() As String
Get
Return Me._resaleFlag
End Get
Set
Me._resaleFlag = Value
End Set
End Property
Public Property Description() As String
Get
Return Me._description
End Get
Set
Me._description = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyCustomsValueResale))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyCustomsValueResale 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 FCFCDDBodyCustomsValueResale object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyCustomsValueResale 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 FCFCDDBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueResale)
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 FCFCDDBodyCustomsValueResale) 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 FCFCDDBodyCustomsValueResale
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyCustomsValueResale)
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 FCFCDDBodyCustomsValueResale
Return CType(Serializer.Deserialize(s), FCFCDDBodyCustomsValueResale)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyCustomsValueResale 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 FCFCDDBodyCustomsValueResale object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyCustomsValueResale 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 FCFCDDBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyCustomsValueResale)
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 FCFCDDBodyCustomsValueResale) 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 FCFCDDBodyCustomsValueResale
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 FCFCDDBodyDocument
#Region "Private fields"
Private _division As FCFCDDBodyDocumentDivision
Private _type As String
Private _referenceNumber As String
Private _issuingDate As Date
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Division() As FCFCDDBodyDocumentDivision
Get
Return Me._division
End Get
Set
Me._division = Value
End Set
End Property
Public Property Type() As String
Get
Return Me._type
End Get
Set
Me._type = Value
End Set
End Property
Public Property ReferenceNumber() As String
Get
Return Me._referenceNumber
End Get
Set
Me._referenceNumber = Value
End Set
End Property
Public Property IssuingDate() As Date
Get
Return Me._issuingDate
End Get
Set
Me._issuingDate = Value
End Set
End Property
Private Shared ReadOnly Property Serializer() As XmlSerializer
Get
If (sSerializer Is Nothing) Then
sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDDBodyDocument))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDDBodyDocument 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 FCFCDDBodyDocument object
'''
''' string workflow markup to deserialize
''' Output FCFCDDBodyDocument 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 FCFCDDBodyDocument, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyDocument)
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 FCFCDDBodyDocument) 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 FCFCDDBodyDocument
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDDBodyDocument)
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 FCFCDDBodyDocument
Return CType(Serializer.Deserialize(s), FCFCDDBodyDocument)
End Function
#End Region
'''
''' Serializes current FCFCDDBodyDocument 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 FCFCDDBodyDocument object
'''
''' string xml file to load and deserialize
''' Output FCFCDDBodyDocument 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 FCFCDDBodyDocument, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDDBodyDocument)
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 FCFCDDBodyDocument) 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 FCFCDDBodyDocument
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 FCFCDDBodyDocumentDivision
'''
Item4
End Enum
Partial Public Class FCFCDDBodyGoodsItem
#Region "Private fields"
Private _sequenceNumber As String
Private _procedure As FCFCDDBodyGoodsItemProcedure
Private _cessionManagementFlag As String
Private _goodsDescription As String
Private _invoiceAmount As Decimal
Private _netMassMeasure As Decimal
Private _originCountry As String
Private _supplementaryInformation As String
Private _condition As String
Private _tobaccoRevenueStampNumber As String
Private _commodityCode As FCFCDDBodyGoodsItemCommodityCode
Private _additionalProcedure As List(Of FCFCDDBodyGoodsItemAdditionalProcedure)
Private _supplementaryCodes As List(Of FCFCDDBodyGoodsItemSupplementaryCodes)
Private _package As FCFCDDBodyGoodsItemPackage
Private _foreignTradeStatistics As FCFCDDBodyGoodsItemForeignTradeStatistics
Private _customsValue As FCFCDDBodyGoodsItemCustomsValue
Private _assessment As FCFCDDBodyGoodsItemAssessment
Private _exciseDuty As List(Of FCFCDDBodyGoodsItemExciseDuty)
Private _preferentialTreatment As FCFCDDBodyGoodsItemPreferentialTreatment
Private _outwardProcessingReduction As List(Of FCFCDDBodyGoodsItemOutwardProcessingReduction)
Private _specialCase As List(Of FCFCDDBodyGoodsItemSpecialCase)
Private _document As List(Of FCFCDDBodyGoodsItemDocument)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._document = New List(Of FCFCDDBodyGoodsItemDocument)()
Me._specialCase = New List(Of FCFCDDBodyGoodsItemSpecialCase)()
Me._outwardProcessingReduction = New List(Of FCFCDDBodyGoodsItemOutwardProcessingReduction)()
Me._preferentialTreatment = New FCFCDDBodyGoodsItemPreferentialTreatment()
Me._exciseDuty = New List(Of FCFCDDBodyGoodsItemExciseDuty)()
Me._assessment = New FCFCDDBodyGoodsItemAssessment()
Me._customsValue = New FCFCDDBodyGoodsItemCustomsValue()
Me._foreignTradeStatistics = New FCFCDDBodyGoodsItemForeignTradeStatistics()
Me._package = New FCFCDDBodyGoodsItemPackage()
Me._supplementaryCodes = New List(Of FCFCDDBodyGoodsItemSupplementaryCodes)()
Me._additionalProcedure = New List(Of FCFCDDBodyGoodsItemAdditionalProcedure)()
Me._commodityCode = New FCFCDDBodyGoodsItemCommodityCode()
Me._procedure = New FCFCDDBodyGoodsItemProcedure()
End Sub
Public Property SequenceNumber() As String
Get
Return Me._sequenceNumber
End Get
Set
Me._sequenceNumber = Value
End Set
End Property
Public Property Procedure() As FCFCDDBodyGoodsItemProcedure
Get
Return Me._procedure
End Get
Set
Me._procedure = Value
End Set
End Property
Public Property CessionManagementFlag() As String
Get
Return Me._cessionManagementFlag
End Get
Set
Me._cessionManagementFlag = Value
End Set
End Property
Public Property GoodsDescription() As String
Get
Return Me._goodsDescription
End Get
Set
Me._goodsDescription = Value
End Set
End Property
Public Property InvoiceAmount() As Decimal
Get
Return Me._invoiceAmount
End Get
Set
Me._invoiceAmount = Value
End Set
End Property
Public Property NetMassMeasure() As Decimal
Get
Return Me._netMassMeasure
End Get
Set
Me._netMassMeasure = Value
End Set
End Property
Public Property OriginCountry() As String
Get
Return Me._originCountry
End Get
Set
Me._originCountry = Value
End Set
End Property
Public Property SupplementaryInformation() As String
Get
Return Me._supplementaryInformation
End Get
Set
Me._supplementaryInformation = Value
End Set
End Property
Public Property Condition() As String
Get
Return Me._condition
End Get
Set
Me._condition = Value
End Set
End Property
Public Property TobaccoRevenueStampNumber() As String
Get
Return Me._tobaccoRevenueStampNumber
End Get
Set
Me._tobaccoRevenueStampNumber = Value
End Set
End Property
Public Property CommodityCode() As FCFCDDBodyGoodsItemCommodityCode
Get
Return Me._commodityCode
End Get
Set
Me._commodityCode = Value
End Set
End Property