'' ------------------------------------------------------------------------------
''
'' Generated by Xsd2Code++. Version 5.0.0.47. www.xsd2code.com
'' FCFCDCListVisualBasicFalseFalseFalseOnlyIfDifferentFalseNet45AllTrueTrueTrueFalseFalseFalseFalseFalseNoneStartWithUnderscoreFalseFalseFalseFalseFalsePublicTrueFalseFalseFalseFalseFalseFalseFalseFalseTrueTrueTrueFalseTrueSerializeDeserializeSaveToFileLoadFromFileFalseTrueIndent2SpaceFalseFalseUTF8XmlSerializerFalseFalseFalseFalseFalseFalseFalseEntityBaseFalseFalse
''
'' ------------------------------------------------------------------------------
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 FCFCDC
Partial Public Class FCFCDC
#Region "Private fields"
Private _metaData As FCFCDCMetaData
Private _header As FCFCDCHeader
Private _declarant As FCFCDCDeclarant
Private _representative As FCFCDCRepresentative
Private _principal As FCFCDCPrincipal
Private _contactPerson As FCFCDCContactPerson
Private _dutyDefermentApproval As List(Of FCFCDCDutyDefermentApproval)
Private _borderTransportMeans As FCFCDCBorderTransportMeans
Private _arrivalTransportMeans As FCFCDCArrivalTransportMeans
Private _previousAdministrativeReferences As FCFCDCPreviousAdministrativeReferences
Private _summaryDeclaration As FCFCDCSummaryDeclaration
Private _customsWarehouse As FCFCDCCustomsWarehouse
Private _inwardProcessing As FCFCDCInwardProcessing
Private _body As FCFCDCBody
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._body = New FCFCDCBody()
Me._inwardProcessing = New FCFCDCInwardProcessing()
Me._customsWarehouse = New FCFCDCCustomsWarehouse()
Me._summaryDeclaration = New FCFCDCSummaryDeclaration()
Me._previousAdministrativeReferences = New FCFCDCPreviousAdministrativeReferences()
Me._arrivalTransportMeans = New FCFCDCArrivalTransportMeans()
Me._borderTransportMeans = New FCFCDCBorderTransportMeans()
Me._dutyDefermentApproval = New List(Of FCFCDCDutyDefermentApproval)()
Me._contactPerson = New FCFCDCContactPerson()
Me._principal = New FCFCDCPrincipal()
Me._representative = New FCFCDCRepresentative()
Me._declarant = New FCFCDCDeclarant()
Me._header = New FCFCDCHeader()
Me._metaData = New FCFCDCMetaData()
End Sub
Public Property MetaData() As FCFCDCMetaData
Get
Return Me._metaData
End Get
Set
Me._metaData = Value
End Set
End Property
Public Property Header() As FCFCDCHeader
Get
Return Me._header
End Get
Set
Me._header = Value
End Set
End Property
Public Property Declarant() As FCFCDCDeclarant
Get
Return Me._declarant
End Get
Set
Me._declarant = Value
End Set
End Property
Public Property Representative() As FCFCDCRepresentative
Get
Return Me._representative
End Get
Set
Me._representative = Value
End Set
End Property
Public Property Principal() As FCFCDCPrincipal
Get
Return Me._principal
End Get
Set
Me._principal = Value
End Set
End Property
Public Property ContactPerson() As FCFCDCContactPerson
Get
Return Me._contactPerson
End Get
Set
Me._contactPerson = Value
End Set
End Property
Public Property DutyDefermentApproval() As List(Of FCFCDCDutyDefermentApproval)
Get
Return Me._dutyDefermentApproval
End Get
Set
Me._dutyDefermentApproval = Value
End Set
End Property
Public Property BorderTransportMeans() As FCFCDCBorderTransportMeans
Get
Return Me._borderTransportMeans
End Get
Set
Me._borderTransportMeans = Value
End Set
End Property
Public Property ArrivalTransportMeans() As FCFCDCArrivalTransportMeans
Get
Return Me._arrivalTransportMeans
End Get
Set
Me._arrivalTransportMeans = Value
End Set
End Property
Public Property PreviousAdministrativeReferences() As FCFCDCPreviousAdministrativeReferences
Get
Return Me._previousAdministrativeReferences
End Get
Set
Me._previousAdministrativeReferences = Value
End Set
End Property
Public Property SummaryDeclaration() As FCFCDCSummaryDeclaration
Get
Return Me._summaryDeclaration
End Get
Set
Me._summaryDeclaration = Value
End Set
End Property
Public Property CustomsWarehouse() As FCFCDCCustomsWarehouse
Get
Return Me._customsWarehouse
End Get
Set
Me._customsWarehouse = Value
End Set
End Property
Public Property InwardProcessing() As FCFCDCInwardProcessing
Get
Return Me._inwardProcessing
End Get
Set
Me._inwardProcessing = Value
End Set
End Property
Public Property Body() As FCFCDCBody
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(FCFCDC))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDC 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 FCFCDC object
'''
''' string workflow markup to deserialize
''' Output FCFCDC 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 FCFCDC, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDC)
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 FCFCDC) 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 FCFCDC
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDC)
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 FCFCDC
Return CType(Serializer.Deserialize(s), FCFCDC)
End Function
#End Region
'''
''' Serializes current FCFCDC 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 FCFCDC object
'''
''' string xml file to load and deserialize
''' Output FCFCDC 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 FCFCDC, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDC)
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 FCFCDC) 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 FCFCDC
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 FCFCDCMetaData
#Region "Private fields"
Private _preparation As FCFCDCMetaDataPreparation
Private _interchangeControlReference As String
Private _messageReferenceNumber As String
Private _messageIdentifier As String
Private _messageGroup As FCFCDCMetaDataMessageGroup
Private _testIndicator As FCFCDCMetaDataTestIndicator
Private _messageType As FCFCDCMetaDataMessageType
Private _interchangeSender As FCFCDCMetaDataInterchangeSender
Private _interchangeRecipient As FCFCDCMetaDataInterchangeRecipient
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._interchangeRecipient = New FCFCDCMetaDataInterchangeRecipient()
Me._interchangeSender = New FCFCDCMetaDataInterchangeSender()
Me._preparation = New FCFCDCMetaDataPreparation()
End Sub
Public Property Preparation() As FCFCDCMetaDataPreparation
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 FCFCDCMetaDataMessageGroup
Get
Return Me._messageGroup
End Get
Set
Me._messageGroup = Value
End Set
End Property
Public Property TestIndicator() As FCFCDCMetaDataTestIndicator
Get
Return Me._testIndicator
End Get
Set
Me._testIndicator = Value
End Set
End Property
Public Property MessageType() As FCFCDCMetaDataMessageType
Get
Return Me._messageType
End Get
Set
Me._messageType = Value
End Set
End Property
Public Property InterchangeSender() As FCFCDCMetaDataInterchangeSender
Get
Return Me._interchangeSender
End Get
Set
Me._interchangeSender = Value
End Set
End Property
Public Property InterchangeRecipient() As FCFCDCMetaDataInterchangeRecipient
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(FCFCDCMetaData))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCMetaData 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 FCFCDCMetaData object
'''
''' string workflow markup to deserialize
''' Output FCFCDCMetaData 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 FCFCDCMetaData, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaData)
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 FCFCDCMetaData) 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 FCFCDCMetaData
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCMetaData)
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 FCFCDCMetaData
Return CType(Serializer.Deserialize(s), FCFCDCMetaData)
End Function
#End Region
'''
''' Serializes current FCFCDCMetaData 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 FCFCDCMetaData object
'''
''' string xml file to load and deserialize
''' Output FCFCDCMetaData 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 FCFCDCMetaData, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaData)
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 FCFCDCMetaData) 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 FCFCDCMetaData
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 FCFCDCMetaDataPreparation
#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(FCFCDCMetaDataPreparation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCMetaDataPreparation 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 FCFCDCMetaDataPreparation object
'''
''' string workflow markup to deserialize
''' Output FCFCDCMetaDataPreparation 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 FCFCDCMetaDataPreparation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataPreparation)
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 FCFCDCMetaDataPreparation) 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 FCFCDCMetaDataPreparation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCMetaDataPreparation)
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 FCFCDCMetaDataPreparation
Return CType(Serializer.Deserialize(s), FCFCDCMetaDataPreparation)
End Function
#End Region
'''
''' Serializes current FCFCDCMetaDataPreparation 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 FCFCDCMetaDataPreparation object
'''
''' string xml file to load and deserialize
''' Output FCFCDCMetaDataPreparation 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 FCFCDCMetaDataPreparation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataPreparation)
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 FCFCDCMetaDataPreparation) 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 FCFCDCMetaDataPreparation
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 FCFCDCMetaDataMessageGroup
'''
ZBE
'''
ZBV
End Enum
Public Enum FCFCDCMetaDataTestIndicator
'''
Item1
End Enum
Public Enum FCFCDCMetaDataMessageType
'''
FCFCDC
End Enum
Partial Public Class FCFCDCMetaDataInterchangeSender
#Region "Private fields"
Private _identification As FCFCDCMetaDataInterchangeSenderIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDCMetaDataInterchangeSenderIdentification()
End Sub
Public Property Identification() As FCFCDCMetaDataInterchangeSenderIdentification
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(FCFCDCMetaDataInterchangeSender))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCMetaDataInterchangeSender 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 FCFCDCMetaDataInterchangeSender object
'''
''' string workflow markup to deserialize
''' Output FCFCDCMetaDataInterchangeSender 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 FCFCDCMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeSender)
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 FCFCDCMetaDataInterchangeSender) 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 FCFCDCMetaDataInterchangeSender
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCMetaDataInterchangeSender)
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 FCFCDCMetaDataInterchangeSender
Return CType(Serializer.Deserialize(s), FCFCDCMetaDataInterchangeSender)
End Function
#End Region
'''
''' Serializes current FCFCDCMetaDataInterchangeSender 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 FCFCDCMetaDataInterchangeSender object
'''
''' string xml file to load and deserialize
''' Output FCFCDCMetaDataInterchangeSender 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 FCFCDCMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeSender)
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 FCFCDCMetaDataInterchangeSender) 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 FCFCDCMetaDataInterchangeSender
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 FCFCDCMetaDataInterchangeSenderIdentification
#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(FCFCDCMetaDataInterchangeSenderIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCMetaDataInterchangeSenderIdentification 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 FCFCDCMetaDataInterchangeSenderIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCMetaDataInterchangeSenderIdentification 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 FCFCDCMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeSenderIdentification)
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 FCFCDCMetaDataInterchangeSenderIdentification) 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 FCFCDCMetaDataInterchangeSenderIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCMetaDataInterchangeSenderIdentification)
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 FCFCDCMetaDataInterchangeSenderIdentification
Return CType(Serializer.Deserialize(s), FCFCDCMetaDataInterchangeSenderIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCMetaDataInterchangeSenderIdentification 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 FCFCDCMetaDataInterchangeSenderIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCMetaDataInterchangeSenderIdentification 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 FCFCDCMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeSenderIdentification)
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 FCFCDCMetaDataInterchangeSenderIdentification) 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 FCFCDCMetaDataInterchangeSenderIdentification
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 FCFCDCMetaDataInterchangeRecipient
#Region "Private fields"
Private _identification As FCFCDCMetaDataInterchangeRecipientIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDCMetaDataInterchangeRecipientIdentification()
End Sub
Public Property Identification() As FCFCDCMetaDataInterchangeRecipientIdentification
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(FCFCDCMetaDataInterchangeRecipient))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCMetaDataInterchangeRecipient 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 FCFCDCMetaDataInterchangeRecipient object
'''
''' string workflow markup to deserialize
''' Output FCFCDCMetaDataInterchangeRecipient 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 FCFCDCMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeRecipient)
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 FCFCDCMetaDataInterchangeRecipient) 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 FCFCDCMetaDataInterchangeRecipient
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCMetaDataInterchangeRecipient)
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 FCFCDCMetaDataInterchangeRecipient
Return CType(Serializer.Deserialize(s), FCFCDCMetaDataInterchangeRecipient)
End Function
#End Region
'''
''' Serializes current FCFCDCMetaDataInterchangeRecipient 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 FCFCDCMetaDataInterchangeRecipient object
'''
''' string xml file to load and deserialize
''' Output FCFCDCMetaDataInterchangeRecipient 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 FCFCDCMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeRecipient)
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 FCFCDCMetaDataInterchangeRecipient) 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 FCFCDCMetaDataInterchangeRecipient
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 FCFCDCMetaDataInterchangeRecipientIdentification
#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(FCFCDCMetaDataInterchangeRecipientIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCMetaDataInterchangeRecipientIdentification 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 FCFCDCMetaDataInterchangeRecipientIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCMetaDataInterchangeRecipientIdentification 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 FCFCDCMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeRecipientIdentification)
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 FCFCDCMetaDataInterchangeRecipientIdentification) 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 FCFCDCMetaDataInterchangeRecipientIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCMetaDataInterchangeRecipientIdentification)
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 FCFCDCMetaDataInterchangeRecipientIdentification
Return CType(Serializer.Deserialize(s), FCFCDCMetaDataInterchangeRecipientIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCMetaDataInterchangeRecipientIdentification 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 FCFCDCMetaDataInterchangeRecipientIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCMetaDataInterchangeRecipientIdentification 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 FCFCDCMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCMetaDataInterchangeRecipientIdentification)
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 FCFCDCMetaDataInterchangeRecipientIdentification) 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 FCFCDCMetaDataInterchangeRecipientIdentification
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 FCFCDCHeader
#Region "Private fields"
Private _messageVersion As String
Private _messageCreationDate As Date
Private _declaration As FCFCDCHeaderDeclaration
Private _localReferenceNumber As String
Private _prematureInputFlag As String
Private _goodsItemQuantity As String
Private _customsGoodsStatus As String
Private _declarantIsConsigneeFlag As String
Private _customsAuthorisation As FCFCDCHeaderCustomsAuthorisation
Private _inputTaxDeductionFlag As String
Private _goodsLocation As String
Private _departureCountry As String
Private _paymentMethod As FCFCDCHeaderPaymentMethod
Private _currencyCode As FCFCDCHeaderCurrencyCode
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 FCFCDCHeaderCustomsAuthorisation()
Me._declaration = New FCFCDCHeaderDeclaration()
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 FCFCDCHeaderDeclaration
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 FCFCDCHeaderCustomsAuthorisation
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 FCFCDCHeaderPaymentMethod
Get
Return Me._paymentMethod
End Get
Set
Me._paymentMethod = Value
End Set
End Property
Public Property CurrencyCode() As FCFCDCHeaderCurrencyCode
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(FCFCDCHeader))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCHeader 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 FCFCDCHeader object
'''
''' string workflow markup to deserialize
''' Output FCFCDCHeader 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 FCFCDCHeader, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCHeader)
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 FCFCDCHeader) 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 FCFCDCHeader
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCHeader)
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 FCFCDCHeader
Return CType(Serializer.Deserialize(s), FCFCDCHeader)
End Function
#End Region
'''
''' Serializes current FCFCDCHeader 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 FCFCDCHeader object
'''
''' string xml file to load and deserialize
''' Output FCFCDCHeader 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 FCFCDCHeader, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCHeader)
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 FCFCDCHeader) 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 FCFCDCHeader
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 FCFCDCHeaderDeclaration
#Region "Private fields"
Private _kind As FCFCDCHeaderDeclarationKind
Private _type As FCFCDCHeaderDeclarationType
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Kind() As FCFCDCHeaderDeclarationKind
Get
Return Me._kind
End Get
Set
Me._kind = Value
End Set
End Property
Public Property Type() As FCFCDCHeaderDeclarationType
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(FCFCDCHeaderDeclaration))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCHeaderDeclaration 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 FCFCDCHeaderDeclaration object
'''
''' string workflow markup to deserialize
''' Output FCFCDCHeaderDeclaration 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 FCFCDCHeaderDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCHeaderDeclaration)
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 FCFCDCHeaderDeclaration) 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 FCFCDCHeaderDeclaration
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCHeaderDeclaration)
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 FCFCDCHeaderDeclaration
Return CType(Serializer.Deserialize(s), FCFCDCHeaderDeclaration)
End Function
#End Region
'''
''' Serializes current FCFCDCHeaderDeclaration 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 FCFCDCHeaderDeclaration object
'''
''' string xml file to load and deserialize
''' Output FCFCDCHeaderDeclaration 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 FCFCDCHeaderDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCHeaderDeclaration)
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 FCFCDCHeaderDeclaration) 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 FCFCDCHeaderDeclaration
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 FCFCDCHeaderDeclarationKind
'''
A
'''
B
'''
D
'''
E
End Enum
Public Enum FCFCDCHeaderDeclarationType
'''
EZA
End Enum
Partial Public Class FCFCDCHeaderCustomsAuthorisation
#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(FCFCDCHeaderCustomsAuthorisation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCHeaderCustomsAuthorisation 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 FCFCDCHeaderCustomsAuthorisation object
'''
''' string workflow markup to deserialize
''' Output FCFCDCHeaderCustomsAuthorisation 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 FCFCDCHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCHeaderCustomsAuthorisation)
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 FCFCDCHeaderCustomsAuthorisation) 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 FCFCDCHeaderCustomsAuthorisation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCHeaderCustomsAuthorisation)
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 FCFCDCHeaderCustomsAuthorisation
Return CType(Serializer.Deserialize(s), FCFCDCHeaderCustomsAuthorisation)
End Function
#End Region
'''
''' Serializes current FCFCDCHeaderCustomsAuthorisation 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 FCFCDCHeaderCustomsAuthorisation object
'''
''' string xml file to load and deserialize
''' Output FCFCDCHeaderCustomsAuthorisation 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 FCFCDCHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCHeaderCustomsAuthorisation)
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 FCFCDCHeaderCustomsAuthorisation) 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 FCFCDCHeaderCustomsAuthorisation
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 FCFCDCHeaderPaymentMethod
'''
A
'''
C
'''
D
'''
E
'''
F
'''
G
'''
Y
'''
Z
End Enum
Public Enum FCFCDCHeaderCurrencyCode
'''
EUR
End Enum
Partial Public Class FCFCDCDeclarant
#Region "Private fields"
Private _identification As FCFCDCDeclarantIdentification
Private _name As String
Private _address As FCFCDCDeclarantAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDCDeclarantAddress()
Me._identification = New FCFCDCDeclarantIdentification()
End Sub
Public Property Identification() As FCFCDCDeclarantIdentification
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 FCFCDCDeclarantAddress
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(FCFCDCDeclarant))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCDeclarant 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 FCFCDCDeclarant object
'''
''' string workflow markup to deserialize
''' Output FCFCDCDeclarant 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 FCFCDCDeclarant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDeclarant)
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 FCFCDCDeclarant) 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 FCFCDCDeclarant
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCDeclarant)
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 FCFCDCDeclarant
Return CType(Serializer.Deserialize(s), FCFCDCDeclarant)
End Function
#End Region
'''
''' Serializes current FCFCDCDeclarant 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 FCFCDCDeclarant object
'''
''' string xml file to load and deserialize
''' Output FCFCDCDeclarant 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 FCFCDCDeclarant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDeclarant)
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 FCFCDCDeclarant) 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 FCFCDCDeclarant
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 FCFCDCDeclarantIdentification
#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(FCFCDCDeclarantIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCDeclarantIdentification 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 FCFCDCDeclarantIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCDeclarantIdentification 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 FCFCDCDeclarantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDeclarantIdentification)
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 FCFCDCDeclarantIdentification) 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 FCFCDCDeclarantIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCDeclarantIdentification)
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 FCFCDCDeclarantIdentification
Return CType(Serializer.Deserialize(s), FCFCDCDeclarantIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCDeclarantIdentification 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 FCFCDCDeclarantIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCDeclarantIdentification 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 FCFCDCDeclarantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDeclarantIdentification)
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 FCFCDCDeclarantIdentification) 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 FCFCDCDeclarantIdentification
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 FCFCDCDeclarantAddress
#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(FCFCDCDeclarantAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCDeclarantAddress 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 FCFCDCDeclarantAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDCDeclarantAddress 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 FCFCDCDeclarantAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDeclarantAddress)
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 FCFCDCDeclarantAddress) 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 FCFCDCDeclarantAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCDeclarantAddress)
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 FCFCDCDeclarantAddress
Return CType(Serializer.Deserialize(s), FCFCDCDeclarantAddress)
End Function
#End Region
'''
''' Serializes current FCFCDCDeclarantAddress 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 FCFCDCDeclarantAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDCDeclarantAddress 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 FCFCDCDeclarantAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDeclarantAddress)
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 FCFCDCDeclarantAddress) 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 FCFCDCDeclarantAddress
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 FCFCDCRepresentative
#Region "Private fields"
Private _identification As FCFCDCRepresentativeIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDCRepresentativeIdentification()
End Sub
Public Property Identification() As FCFCDCRepresentativeIdentification
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(FCFCDCRepresentative))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCRepresentative 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 FCFCDCRepresentative object
'''
''' string workflow markup to deserialize
''' Output FCFCDCRepresentative 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 FCFCDCRepresentative, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCRepresentative)
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 FCFCDCRepresentative) 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 FCFCDCRepresentative
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCRepresentative)
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 FCFCDCRepresentative
Return CType(Serializer.Deserialize(s), FCFCDCRepresentative)
End Function
#End Region
'''
''' Serializes current FCFCDCRepresentative 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 FCFCDCRepresentative object
'''
''' string xml file to load and deserialize
''' Output FCFCDCRepresentative 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 FCFCDCRepresentative, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCRepresentative)
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 FCFCDCRepresentative) 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 FCFCDCRepresentative
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 FCFCDCRepresentativeIdentification
#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(FCFCDCRepresentativeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCRepresentativeIdentification 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 FCFCDCRepresentativeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCRepresentativeIdentification 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 FCFCDCRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCRepresentativeIdentification)
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 FCFCDCRepresentativeIdentification) 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 FCFCDCRepresentativeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCRepresentativeIdentification)
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 FCFCDCRepresentativeIdentification
Return CType(Serializer.Deserialize(s), FCFCDCRepresentativeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCRepresentativeIdentification 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 FCFCDCRepresentativeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCRepresentativeIdentification 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 FCFCDCRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCRepresentativeIdentification)
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 FCFCDCRepresentativeIdentification) 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 FCFCDCRepresentativeIdentification
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 FCFCDCPrincipal
#Region "Private fields"
Private _identification As FCFCDCPrincipalIdentification
Private _name As String
Private _address As FCFCDCPrincipalAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDCPrincipalAddress()
Me._identification = New FCFCDCPrincipalIdentification()
End Sub
Public Property Identification() As FCFCDCPrincipalIdentification
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 FCFCDCPrincipalAddress
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(FCFCDCPrincipal))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCPrincipal 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 FCFCDCPrincipal object
'''
''' string workflow markup to deserialize
''' Output FCFCDCPrincipal 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 FCFCDCPrincipal, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPrincipal)
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 FCFCDCPrincipal) 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 FCFCDCPrincipal
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCPrincipal)
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 FCFCDCPrincipal
Return CType(Serializer.Deserialize(s), FCFCDCPrincipal)
End Function
#End Region
'''
''' Serializes current FCFCDCPrincipal 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 FCFCDCPrincipal object
'''
''' string xml file to load and deserialize
''' Output FCFCDCPrincipal 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 FCFCDCPrincipal, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPrincipal)
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 FCFCDCPrincipal) 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 FCFCDCPrincipal
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 FCFCDCPrincipalIdentification
#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(FCFCDCPrincipalIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCPrincipalIdentification 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 FCFCDCPrincipalIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCPrincipalIdentification 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 FCFCDCPrincipalIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPrincipalIdentification)
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 FCFCDCPrincipalIdentification) 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 FCFCDCPrincipalIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCPrincipalIdentification)
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 FCFCDCPrincipalIdentification
Return CType(Serializer.Deserialize(s), FCFCDCPrincipalIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCPrincipalIdentification 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 FCFCDCPrincipalIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCPrincipalIdentification 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 FCFCDCPrincipalIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPrincipalIdentification)
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 FCFCDCPrincipalIdentification) 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 FCFCDCPrincipalIdentification
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 FCFCDCPrincipalAddress
#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(FCFCDCPrincipalAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCPrincipalAddress 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 FCFCDCPrincipalAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDCPrincipalAddress 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 FCFCDCPrincipalAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPrincipalAddress)
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 FCFCDCPrincipalAddress) 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 FCFCDCPrincipalAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCPrincipalAddress)
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 FCFCDCPrincipalAddress
Return CType(Serializer.Deserialize(s), FCFCDCPrincipalAddress)
End Function
#End Region
'''
''' Serializes current FCFCDCPrincipalAddress 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 FCFCDCPrincipalAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDCPrincipalAddress 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 FCFCDCPrincipalAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPrincipalAddress)
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 FCFCDCPrincipalAddress) 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 FCFCDCPrincipalAddress
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 FCFCDCContactPerson
#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(FCFCDCContactPerson))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCContactPerson 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 FCFCDCContactPerson object
'''
''' string workflow markup to deserialize
''' Output FCFCDCContactPerson 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 FCFCDCContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCContactPerson)
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 FCFCDCContactPerson) 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 FCFCDCContactPerson
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCContactPerson)
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 FCFCDCContactPerson
Return CType(Serializer.Deserialize(s), FCFCDCContactPerson)
End Function
#End Region
'''
''' Serializes current FCFCDCContactPerson 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 FCFCDCContactPerson object
'''
''' string xml file to load and deserialize
''' Output FCFCDCContactPerson 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 FCFCDCContactPerson, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCContactPerson)
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 FCFCDCContactPerson) 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 FCFCDCContactPerson
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 FCFCDCDutyDefermentApproval
#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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._dutyDefermentApplicant = New FCFCDCDutyDefermentApprovalDutyDefermentApplicant()
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant
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(FCFCDCDutyDefermentApproval))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCDutyDefermentApproval 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 FCFCDCDutyDefermentApproval object
'''
''' string workflow markup to deserialize
''' Output FCFCDCDutyDefermentApproval 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 FCFCDCDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDutyDefermentApproval)
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 FCFCDCDutyDefermentApproval) 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 FCFCDCDutyDefermentApproval
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCDutyDefermentApproval)
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 FCFCDCDutyDefermentApproval
Return CType(Serializer.Deserialize(s), FCFCDCDutyDefermentApproval)
End Function
#End Region
'''
''' Serializes current FCFCDCDutyDefermentApproval 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 FCFCDCDutyDefermentApproval object
'''
''' string xml file to load and deserialize
''' Output FCFCDCDutyDefermentApproval 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 FCFCDCDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDutyDefermentApproval)
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 FCFCDCDutyDefermentApproval) 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 FCFCDCDutyDefermentApproval
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant
#Region "Private fields"
Private _identification As FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification()
End Sub
Public Property Identification() As FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification
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(FCFCDCDutyDefermentApprovalDutyDefermentApplicant))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant object
'''
''' string workflow markup to deserialize
''' Output FCFCDCDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDutyDefermentApprovalDutyDefermentApplicant)
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCDutyDefermentApprovalDutyDefermentApplicant)
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant
Return CType(Serializer.Deserialize(s), FCFCDCDutyDefermentApprovalDutyDefermentApplicant)
End Function
#End Region
'''
''' Serializes current FCFCDCDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant object
'''
''' string xml file to load and deserialize
''' Output FCFCDCDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDutyDefermentApprovalDutyDefermentApplicant)
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicant
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification
#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(FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification)
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification)
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification
Return CType(Serializer.Deserialize(s), FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification)
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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDCDutyDefermentApprovalDutyDefermentApplicantIdentification
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 FCFCDCBorderTransportMeans
#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(FCFCDCBorderTransportMeans))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBorderTransportMeans 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 FCFCDCBorderTransportMeans object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBorderTransportMeans 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 FCFCDCBorderTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBorderTransportMeans)
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 FCFCDCBorderTransportMeans) 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 FCFCDCBorderTransportMeans
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBorderTransportMeans)
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 FCFCDCBorderTransportMeans
Return CType(Serializer.Deserialize(s), FCFCDCBorderTransportMeans)
End Function
#End Region
'''
''' Serializes current FCFCDCBorderTransportMeans 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 FCFCDCBorderTransportMeans object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBorderTransportMeans 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 FCFCDCBorderTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBorderTransportMeans)
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 FCFCDCBorderTransportMeans) 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 FCFCDCBorderTransportMeans
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 FCFCDCArrivalTransportMeans
#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(FCFCDCArrivalTransportMeans))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCArrivalTransportMeans 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 FCFCDCArrivalTransportMeans object
'''
''' string workflow markup to deserialize
''' Output FCFCDCArrivalTransportMeans 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 FCFCDCArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCArrivalTransportMeans)
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 FCFCDCArrivalTransportMeans) 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 FCFCDCArrivalTransportMeans
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCArrivalTransportMeans)
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 FCFCDCArrivalTransportMeans
Return CType(Serializer.Deserialize(s), FCFCDCArrivalTransportMeans)
End Function
#End Region
'''
''' Serializes current FCFCDCArrivalTransportMeans 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 FCFCDCArrivalTransportMeans object
'''
''' string xml file to load and deserialize
''' Output FCFCDCArrivalTransportMeans 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 FCFCDCArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCArrivalTransportMeans)
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 FCFCDCArrivalTransportMeans) 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 FCFCDCArrivalTransportMeans
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 FCFCDCPreviousAdministrativeReferences
#Region "Private fields"
Private _type As String
Private _previousAdministrativeReference As FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._previousAdministrativeReference = New FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference()
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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference
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(FCFCDCPreviousAdministrativeReferences))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCPreviousAdministrativeReferences 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 FCFCDCPreviousAdministrativeReferences object
'''
''' string workflow markup to deserialize
''' Output FCFCDCPreviousAdministrativeReferences 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 FCFCDCPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPreviousAdministrativeReferences)
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 FCFCDCPreviousAdministrativeReferences) 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 FCFCDCPreviousAdministrativeReferences
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCPreviousAdministrativeReferences)
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 FCFCDCPreviousAdministrativeReferences
Return CType(Serializer.Deserialize(s), FCFCDCPreviousAdministrativeReferences)
End Function
#End Region
'''
''' Serializes current FCFCDCPreviousAdministrativeReferences 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 FCFCDCPreviousAdministrativeReferences object
'''
''' string xml file to load and deserialize
''' Output FCFCDCPreviousAdministrativeReferences 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 FCFCDCPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPreviousAdministrativeReferences)
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 FCFCDCPreviousAdministrativeReferences) 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 FCFCDCPreviousAdministrativeReferences
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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference
#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(FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference object
'''
''' string workflow markup to deserialize
''' Output FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference)
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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference)
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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference
Return CType(Serializer.Deserialize(s), FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference)
End Function
#End Region
'''
''' Serializes current FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference object
'''
''' string xml file to load and deserialize
''' Output FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference)
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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDCPreviousAdministrativeReferencesPreviousAdministrativeReference
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 FCFCDCSummaryDeclaration
#Region "Private fields"
Private _identificationIndicator As FCFCDCSummaryDeclarationIdentificationIndicator
Private _goodsItem As List(Of FCFCDCSummaryDeclarationGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDCSummaryDeclarationGoodsItem)()
End Sub
Public Property IdentificationIndicator() As FCFCDCSummaryDeclarationIdentificationIndicator
Get
Return Me._identificationIndicator
End Get
Set
Me._identificationIndicator = Value
End Set
End Property
Public Property GoodsItem() As List(Of FCFCDCSummaryDeclarationGoodsItem)
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(FCFCDCSummaryDeclaration))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCSummaryDeclaration 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 FCFCDCSummaryDeclaration object
'''
''' string workflow markup to deserialize
''' Output FCFCDCSummaryDeclaration 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 FCFCDCSummaryDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclaration)
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 FCFCDCSummaryDeclaration) 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 FCFCDCSummaryDeclaration
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCSummaryDeclaration)
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 FCFCDCSummaryDeclaration
Return CType(Serializer.Deserialize(s), FCFCDCSummaryDeclaration)
End Function
#End Region
'''
''' Serializes current FCFCDCSummaryDeclaration 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 FCFCDCSummaryDeclaration object
'''
''' string xml file to load and deserialize
''' Output FCFCDCSummaryDeclaration 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 FCFCDCSummaryDeclaration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclaration)
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 FCFCDCSummaryDeclaration) 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 FCFCDCSummaryDeclaration
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 FCFCDCSummaryDeclarationIdentificationIndicator
'''
AWB
'''
REG
End Enum
Partial Public Class FCFCDCSummaryDeclarationGoodsItem
#Region "Private fields"
Private _quantity As String
Private _identificationByKey As FCFCDCSummaryDeclarationGoodsItemIdentificationByKey
Private _identificationByRegistration As FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identificationByRegistration = New FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration()
Me._identificationByKey = New FCFCDCSummaryDeclarationGoodsItemIdentificationByKey()
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey
Get
Return Me._identificationByKey
End Get
Set
Me._identificationByKey = Value
End Set
End Property
Public Property IdentificationByRegistration() As FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration
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(FCFCDCSummaryDeclarationGoodsItem))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItem 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 FCFCDCSummaryDeclarationGoodsItem object
'''
''' string workflow markup to deserialize
''' Output FCFCDCSummaryDeclarationGoodsItem 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 FCFCDCSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItem)
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 FCFCDCSummaryDeclarationGoodsItem) 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 FCFCDCSummaryDeclarationGoodsItem
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCSummaryDeclarationGoodsItem)
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 FCFCDCSummaryDeclarationGoodsItem
Return CType(Serializer.Deserialize(s), FCFCDCSummaryDeclarationGoodsItem)
End Function
#End Region
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItem 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 FCFCDCSummaryDeclarationGoodsItem object
'''
''' string xml file to load and deserialize
''' Output FCFCDCSummaryDeclarationGoodsItem 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 FCFCDCSummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItem)
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 FCFCDCSummaryDeclarationGoodsItem) 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 FCFCDCSummaryDeclarationGoodsItem
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey
#Region "Private fields"
Private _kind As FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyKind
Private _number As String
Private _custodian As FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._custodian = New FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian()
End Sub
Public Property Kind() As FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyKind
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian
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(FCFCDCSummaryDeclarationGoodsItemIdentificationByKey))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey object
'''
''' string workflow markup to deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByKey)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCSummaryDeclarationGoodsItemIdentificationByKey)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey
Return CType(Serializer.Deserialize(s), FCFCDCSummaryDeclarationGoodsItemIdentificationByKey)
End Function
#End Region
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey object
'''
''' string xml file to load and deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByKey)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKey
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyKind
'''
AWB
'''
ULD
End Enum
Partial Public Class FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian
#Region "Private fields"
Private _identification As FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification()
End Sub
Public Property Identification() As FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
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(FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
'''
''' string workflow markup to deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian
Return CType(Serializer.Deserialize(s), FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
End Function
#End Region
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian object
'''
''' string xml file to load and deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodian
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
#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(FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
Return CType(Serializer.Deserialize(s), FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration
#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(FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration object
'''
''' string workflow markup to deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration
Return CType(Serializer.Deserialize(s), FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration)
End Function
#End Region
'''
''' Serializes current FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration object
'''
''' string xml file to load and deserialize
''' Output FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration)
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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDCSummaryDeclarationGoodsItemIdentificationByRegistration
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 FCFCDCCustomsWarehouse
#Region "Private fields"
Private _sequenceNumber As FCFCDCCustomsWarehouseSequenceNumber
Private _goodsItemQuantity As String
Private _customsAuthorisation As FCFCDCCustomsWarehouseCustomsAuthorisation
Private _localReferenceNumber As String
Private _goodsItem As List(Of FCFCDCCustomsWarehouseGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDCCustomsWarehouseGoodsItem)()
Me._customsAuthorisation = New FCFCDCCustomsWarehouseCustomsAuthorisation()
End Sub
Public Property SequenceNumber() As FCFCDCCustomsWarehouseSequenceNumber
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 FCFCDCCustomsWarehouseCustomsAuthorisation
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 FCFCDCCustomsWarehouseGoodsItem)
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(FCFCDCCustomsWarehouse))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCCustomsWarehouse 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 FCFCDCCustomsWarehouse object
'''
''' string workflow markup to deserialize
''' Output FCFCDCCustomsWarehouse 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 FCFCDCCustomsWarehouse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouse)
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 FCFCDCCustomsWarehouse) 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 FCFCDCCustomsWarehouse
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCCustomsWarehouse)
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 FCFCDCCustomsWarehouse
Return CType(Serializer.Deserialize(s), FCFCDCCustomsWarehouse)
End Function
#End Region
'''
''' Serializes current FCFCDCCustomsWarehouse 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 FCFCDCCustomsWarehouse object
'''
''' string xml file to load and deserialize
''' Output FCFCDCCustomsWarehouse 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 FCFCDCCustomsWarehouse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouse)
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 FCFCDCCustomsWarehouse) 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 FCFCDCCustomsWarehouse
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 FCFCDCCustomsWarehouseSequenceNumber
'''
Item1
End Enum
Partial Public Class FCFCDCCustomsWarehouseCustomsAuthorisation
#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(FCFCDCCustomsWarehouseCustomsAuthorisation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCCustomsWarehouseCustomsAuthorisation 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 FCFCDCCustomsWarehouseCustomsAuthorisation object
'''
''' string workflow markup to deserialize
''' Output FCFCDCCustomsWarehouseCustomsAuthorisation 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 FCFCDCCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseCustomsAuthorisation)
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 FCFCDCCustomsWarehouseCustomsAuthorisation) 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 FCFCDCCustomsWarehouseCustomsAuthorisation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCCustomsWarehouseCustomsAuthorisation)
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 FCFCDCCustomsWarehouseCustomsAuthorisation
Return CType(Serializer.Deserialize(s), FCFCDCCustomsWarehouseCustomsAuthorisation)
End Function
#End Region
'''
''' Serializes current FCFCDCCustomsWarehouseCustomsAuthorisation 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 FCFCDCCustomsWarehouseCustomsAuthorisation object
'''
''' string xml file to load and deserialize
''' Output FCFCDCCustomsWarehouseCustomsAuthorisation 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 FCFCDCCustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseCustomsAuthorisation)
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 FCFCDCCustomsWarehouseCustomsAuthorisation) 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 FCFCDCCustomsWarehouseCustomsAuthorisation
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 FCFCDCCustomsWarehouseGoodsItem
#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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount
Private _debitAmount As FCFCDCCustomsWarehouseGoodsItemDebitAmount
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._debitAmount = New FCFCDCCustomsWarehouseGoodsItemDebitAmount()
Me._commercialAmount = New FCFCDCCustomsWarehouseGoodsItemCommercialAmount()
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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount
Get
Return Me._commercialAmount
End Get
Set
Me._commercialAmount = Value
End Set
End Property
Public Property DebitAmount() As FCFCDCCustomsWarehouseGoodsItemDebitAmount
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(FCFCDCCustomsWarehouseGoodsItem))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCCustomsWarehouseGoodsItem 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 FCFCDCCustomsWarehouseGoodsItem object
'''
''' string workflow markup to deserialize
''' Output FCFCDCCustomsWarehouseGoodsItem 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 FCFCDCCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseGoodsItem)
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 FCFCDCCustomsWarehouseGoodsItem) 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 FCFCDCCustomsWarehouseGoodsItem
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCCustomsWarehouseGoodsItem)
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 FCFCDCCustomsWarehouseGoodsItem
Return CType(Serializer.Deserialize(s), FCFCDCCustomsWarehouseGoodsItem)
End Function
#End Region
'''
''' Serializes current FCFCDCCustomsWarehouseGoodsItem 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 FCFCDCCustomsWarehouseGoodsItem object
'''
''' string xml file to load and deserialize
''' Output FCFCDCCustomsWarehouseGoodsItem 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 FCFCDCCustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseGoodsItem)
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 FCFCDCCustomsWarehouseGoodsItem) 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 FCFCDCCustomsWarehouseGoodsItem
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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount
#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(FCFCDCCustomsWarehouseGoodsItemCommercialAmount))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount object
'''
''' string workflow markup to deserialize
''' Output FCFCDCCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseGoodsItemCommercialAmount)
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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCCustomsWarehouseGoodsItemCommercialAmount)
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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount
Return CType(Serializer.Deserialize(s), FCFCDCCustomsWarehouseGoodsItemCommercialAmount)
End Function
#End Region
'''
''' Serializes current FCFCDCCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount object
'''
''' string xml file to load and deserialize
''' Output FCFCDCCustomsWarehouseGoodsItemCommercialAmount 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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseGoodsItemCommercialAmount)
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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDCCustomsWarehouseGoodsItemCommercialAmount
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 FCFCDCCustomsWarehouseGoodsItemDebitAmount
#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(FCFCDCCustomsWarehouseGoodsItemDebitAmount))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCCustomsWarehouseGoodsItemDebitAmount 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 FCFCDCCustomsWarehouseGoodsItemDebitAmount object
'''
''' string workflow markup to deserialize
''' Output FCFCDCCustomsWarehouseGoodsItemDebitAmount 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 FCFCDCCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseGoodsItemDebitAmount)
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 FCFCDCCustomsWarehouseGoodsItemDebitAmount) 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 FCFCDCCustomsWarehouseGoodsItemDebitAmount
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCCustomsWarehouseGoodsItemDebitAmount)
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 FCFCDCCustomsWarehouseGoodsItemDebitAmount
Return CType(Serializer.Deserialize(s), FCFCDCCustomsWarehouseGoodsItemDebitAmount)
End Function
#End Region
'''
''' Serializes current FCFCDCCustomsWarehouseGoodsItemDebitAmount 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 FCFCDCCustomsWarehouseGoodsItemDebitAmount object
'''
''' string xml file to load and deserialize
''' Output FCFCDCCustomsWarehouseGoodsItemDebitAmount 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 FCFCDCCustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCCustomsWarehouseGoodsItemDebitAmount)
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 FCFCDCCustomsWarehouseGoodsItemDebitAmount) 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 FCFCDCCustomsWarehouseGoodsItemDebitAmount
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 FCFCDCInwardProcessing
#Region "Private fields"
Private _sequenceNumber As FCFCDCInwardProcessingSequenceNumber
Private _goodsItemQuantity As String
Private _customsAuthorisation As FCFCDCInwardProcessingCustomsAuthorisation
Private _simplifiedGrantAuthorisationFlag As String
Private _monitoringCustomsOffice As FCFCDCInwardProcessingMonitoringCustomsOffice
Private _goodsItem As List(Of FCFCDCInwardProcessingGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDCInwardProcessingGoodsItem)()
Me._monitoringCustomsOffice = New FCFCDCInwardProcessingMonitoringCustomsOffice()
Me._customsAuthorisation = New FCFCDCInwardProcessingCustomsAuthorisation()
End Sub
Public Property SequenceNumber() As FCFCDCInwardProcessingSequenceNumber
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 FCFCDCInwardProcessingCustomsAuthorisation
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 FCFCDCInwardProcessingMonitoringCustomsOffice
Get
Return Me._monitoringCustomsOffice
End Get
Set
Me._monitoringCustomsOffice = Value
End Set
End Property
Public Property GoodsItem() As List(Of FCFCDCInwardProcessingGoodsItem)
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(FCFCDCInwardProcessing))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCInwardProcessing 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 FCFCDCInwardProcessing object
'''
''' string workflow markup to deserialize
''' Output FCFCDCInwardProcessing 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 FCFCDCInwardProcessing, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessing)
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 FCFCDCInwardProcessing) 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 FCFCDCInwardProcessing
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCInwardProcessing)
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 FCFCDCInwardProcessing
Return CType(Serializer.Deserialize(s), FCFCDCInwardProcessing)
End Function
#End Region
'''
''' Serializes current FCFCDCInwardProcessing 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 FCFCDCInwardProcessing object
'''
''' string xml file to load and deserialize
''' Output FCFCDCInwardProcessing 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 FCFCDCInwardProcessing, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessing)
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 FCFCDCInwardProcessing) 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 FCFCDCInwardProcessing
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 FCFCDCInwardProcessingSequenceNumber
'''
Item1
End Enum
Partial Public Class FCFCDCInwardProcessingCustomsAuthorisation
#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(FCFCDCInwardProcessingCustomsAuthorisation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCInwardProcessingCustomsAuthorisation 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 FCFCDCInwardProcessingCustomsAuthorisation object
'''
''' string workflow markup to deserialize
''' Output FCFCDCInwardProcessingCustomsAuthorisation 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 FCFCDCInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingCustomsAuthorisation)
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 FCFCDCInwardProcessingCustomsAuthorisation) 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 FCFCDCInwardProcessingCustomsAuthorisation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCInwardProcessingCustomsAuthorisation)
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 FCFCDCInwardProcessingCustomsAuthorisation
Return CType(Serializer.Deserialize(s), FCFCDCInwardProcessingCustomsAuthorisation)
End Function
#End Region
'''
''' Serializes current FCFCDCInwardProcessingCustomsAuthorisation 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 FCFCDCInwardProcessingCustomsAuthorisation object
'''
''' string xml file to load and deserialize
''' Output FCFCDCInwardProcessingCustomsAuthorisation 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 FCFCDCInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingCustomsAuthorisation)
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 FCFCDCInwardProcessingCustomsAuthorisation) 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 FCFCDCInwardProcessingCustomsAuthorisation
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 FCFCDCInwardProcessingMonitoringCustomsOffice
#Region "Private fields"
Private _identification As FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._identification = New FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification()
End Sub
Public Property Identification() As FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification
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(FCFCDCInwardProcessingMonitoringCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCInwardProcessingMonitoringCustomsOffice 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 FCFCDCInwardProcessingMonitoringCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output FCFCDCInwardProcessingMonitoringCustomsOffice 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 FCFCDCInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingMonitoringCustomsOffice)
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 FCFCDCInwardProcessingMonitoringCustomsOffice) 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 FCFCDCInwardProcessingMonitoringCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCInwardProcessingMonitoringCustomsOffice)
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 FCFCDCInwardProcessingMonitoringCustomsOffice
Return CType(Serializer.Deserialize(s), FCFCDCInwardProcessingMonitoringCustomsOffice)
End Function
#End Region
'''
''' Serializes current FCFCDCInwardProcessingMonitoringCustomsOffice 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 FCFCDCInwardProcessingMonitoringCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output FCFCDCInwardProcessingMonitoringCustomsOffice 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 FCFCDCInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingMonitoringCustomsOffice)
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 FCFCDCInwardProcessingMonitoringCustomsOffice) 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 FCFCDCInwardProcessingMonitoringCustomsOffice
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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification
#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(FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification)
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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification)
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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification
Return CType(Serializer.Deserialize(s), FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification)
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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDCInwardProcessingMonitoringCustomsOfficeIdentification
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 FCFCDCInwardProcessingGoodsItem
#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(FCFCDCInwardProcessingGoodsItem))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCInwardProcessingGoodsItem 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 FCFCDCInwardProcessingGoodsItem object
'''
''' string workflow markup to deserialize
''' Output FCFCDCInwardProcessingGoodsItem 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 FCFCDCInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingGoodsItem)
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 FCFCDCInwardProcessingGoodsItem) 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 FCFCDCInwardProcessingGoodsItem
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCInwardProcessingGoodsItem)
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 FCFCDCInwardProcessingGoodsItem
Return CType(Serializer.Deserialize(s), FCFCDCInwardProcessingGoodsItem)
End Function
#End Region
'''
''' Serializes current FCFCDCInwardProcessingGoodsItem 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 FCFCDCInwardProcessingGoodsItem object
'''
''' string xml file to load and deserialize
''' Output FCFCDCInwardProcessingGoodsItem 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 FCFCDCInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCInwardProcessingGoodsItem)
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 FCFCDCInwardProcessingGoodsItem) 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 FCFCDCInwardProcessingGoodsItem
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 FCFCDCBody
#Region "Private fields"
Private _customsValueFlag As String
Private _consignor As FCFCDCBodyConsignor
Private _consignee As FCFCDCBodyConsignee
Private _acquirer As FCFCDCBodyAcquirer
Private _containers As FCFCDCBodyContainers
Private _deliveryTerms As FCFCDCBodyDeliveryTerms
Private _paymentTransaction As FCFCDCBodyPaymentTransaction
Private _foreignTradeStatistics As FCFCDCBodyForeignTradeStatistics
Private _customsValue As FCFCDCBodyCustomsValue
Private _document As List(Of FCFCDCBodyDocument)
Private _goodsItem As List(Of FCFCDCBodyGoodsItem)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsItem = New List(Of FCFCDCBodyGoodsItem)()
Me._document = New List(Of FCFCDCBodyDocument)()
Me._customsValue = New FCFCDCBodyCustomsValue()
Me._foreignTradeStatistics = New FCFCDCBodyForeignTradeStatistics()
Me._paymentTransaction = New FCFCDCBodyPaymentTransaction()
Me._deliveryTerms = New FCFCDCBodyDeliveryTerms()
Me._containers = New FCFCDCBodyContainers()
Me._acquirer = New FCFCDCBodyAcquirer()
Me._consignee = New FCFCDCBodyConsignee()
Me._consignor = New FCFCDCBodyConsignor()
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 FCFCDCBodyConsignor
Get
Return Me._consignor
End Get
Set
Me._consignor = Value
End Set
End Property
Public Property Consignee() As FCFCDCBodyConsignee
Get
Return Me._consignee
End Get
Set
Me._consignee = Value
End Set
End Property
Public Property Acquirer() As FCFCDCBodyAcquirer
Get
Return Me._acquirer
End Get
Set
Me._acquirer = Value
End Set
End Property
Public Property Containers() As FCFCDCBodyContainers
Get
Return Me._containers
End Get
Set
Me._containers = Value
End Set
End Property
Public Property DeliveryTerms() As FCFCDCBodyDeliveryTerms
Get
Return Me._deliveryTerms
End Get
Set
Me._deliveryTerms = Value
End Set
End Property
Public Property PaymentTransaction() As FCFCDCBodyPaymentTransaction
Get
Return Me._paymentTransaction
End Get
Set
Me._paymentTransaction = Value
End Set
End Property
Public Property ForeignTradeStatistics() As FCFCDCBodyForeignTradeStatistics
Get
Return Me._foreignTradeStatistics
End Get
Set
Me._foreignTradeStatistics = Value
End Set
End Property
Public Property CustomsValue() As FCFCDCBodyCustomsValue
Get
Return Me._customsValue
End Get
Set
Me._customsValue = Value
End Set
End Property
Public Property Document() As List(Of FCFCDCBodyDocument)
Get
Return Me._document
End Get
Set
Me._document = Value
End Set
End Property
Public Property GoodsItem() As List(Of FCFCDCBodyGoodsItem)
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(FCFCDCBody))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBody 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 FCFCDCBody object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBody 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 FCFCDCBody, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBody)
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 FCFCDCBody) 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 FCFCDCBody
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBody)
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 FCFCDCBody
Return CType(Serializer.Deserialize(s), FCFCDCBody)
End Function
#End Region
'''
''' Serializes current FCFCDCBody 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 FCFCDCBody object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBody 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 FCFCDCBody, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBody)
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 FCFCDCBody) 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 FCFCDCBody
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 FCFCDCBodyConsignor
#Region "Private fields"
Private _identification As FCFCDCBodyConsignorIdentification
Private _name As String
Private _address As FCFCDCBodyConsignorAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDCBodyConsignorAddress()
Me._identification = New FCFCDCBodyConsignorIdentification()
End Sub
Public Property Identification() As FCFCDCBodyConsignorIdentification
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 FCFCDCBodyConsignorAddress
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(FCFCDCBodyConsignor))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyConsignor 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 FCFCDCBodyConsignor object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyConsignor 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 FCFCDCBodyConsignor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignor)
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 FCFCDCBodyConsignor) 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 FCFCDCBodyConsignor
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyConsignor)
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 FCFCDCBodyConsignor
Return CType(Serializer.Deserialize(s), FCFCDCBodyConsignor)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyConsignor 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 FCFCDCBodyConsignor object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyConsignor 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 FCFCDCBodyConsignor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignor)
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 FCFCDCBodyConsignor) 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 FCFCDCBodyConsignor
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 FCFCDCBodyConsignorIdentification
#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(FCFCDCBodyConsignorIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyConsignorIdentification 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 FCFCDCBodyConsignorIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyConsignorIdentification 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 FCFCDCBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignorIdentification)
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 FCFCDCBodyConsignorIdentification) 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 FCFCDCBodyConsignorIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyConsignorIdentification)
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 FCFCDCBodyConsignorIdentification
Return CType(Serializer.Deserialize(s), FCFCDCBodyConsignorIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyConsignorIdentification 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 FCFCDCBodyConsignorIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyConsignorIdentification 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 FCFCDCBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignorIdentification)
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 FCFCDCBodyConsignorIdentification) 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 FCFCDCBodyConsignorIdentification
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 FCFCDCBodyConsignorAddress
#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(FCFCDCBodyConsignorAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyConsignorAddress 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 FCFCDCBodyConsignorAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyConsignorAddress 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 FCFCDCBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignorAddress)
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 FCFCDCBodyConsignorAddress) 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 FCFCDCBodyConsignorAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyConsignorAddress)
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 FCFCDCBodyConsignorAddress
Return CType(Serializer.Deserialize(s), FCFCDCBodyConsignorAddress)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyConsignorAddress 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 FCFCDCBodyConsignorAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyConsignorAddress 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 FCFCDCBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignorAddress)
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 FCFCDCBodyConsignorAddress) 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 FCFCDCBodyConsignorAddress
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 FCFCDCBodyConsignee
#Region "Private fields"
Private _identification As FCFCDCBodyConsigneeIdentification
Private _name As String
Private _address As FCFCDCBodyConsigneeAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDCBodyConsigneeAddress()
Me._identification = New FCFCDCBodyConsigneeIdentification()
End Sub
Public Property Identification() As FCFCDCBodyConsigneeIdentification
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 FCFCDCBodyConsigneeAddress
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(FCFCDCBodyConsignee))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyConsignee 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 FCFCDCBodyConsignee object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyConsignee 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 FCFCDCBodyConsignee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignee)
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 FCFCDCBodyConsignee) 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 FCFCDCBodyConsignee
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyConsignee)
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 FCFCDCBodyConsignee
Return CType(Serializer.Deserialize(s), FCFCDCBodyConsignee)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyConsignee 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 FCFCDCBodyConsignee object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyConsignee 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 FCFCDCBodyConsignee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsignee)
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 FCFCDCBodyConsignee) 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 FCFCDCBodyConsignee
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 FCFCDCBodyConsigneeIdentification
#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(FCFCDCBodyConsigneeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyConsigneeIdentification 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 FCFCDCBodyConsigneeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyConsigneeIdentification 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 FCFCDCBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsigneeIdentification)
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 FCFCDCBodyConsigneeIdentification) 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 FCFCDCBodyConsigneeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyConsigneeIdentification)
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 FCFCDCBodyConsigneeIdentification
Return CType(Serializer.Deserialize(s), FCFCDCBodyConsigneeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyConsigneeIdentification 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 FCFCDCBodyConsigneeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyConsigneeIdentification 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 FCFCDCBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsigneeIdentification)
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 FCFCDCBodyConsigneeIdentification) 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 FCFCDCBodyConsigneeIdentification
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 FCFCDCBodyConsigneeAddress
#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(FCFCDCBodyConsigneeAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyConsigneeAddress 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 FCFCDCBodyConsigneeAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyConsigneeAddress 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 FCFCDCBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsigneeAddress)
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 FCFCDCBodyConsigneeAddress) 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 FCFCDCBodyConsigneeAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyConsigneeAddress)
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 FCFCDCBodyConsigneeAddress
Return CType(Serializer.Deserialize(s), FCFCDCBodyConsigneeAddress)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyConsigneeAddress 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 FCFCDCBodyConsigneeAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyConsigneeAddress 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 FCFCDCBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyConsigneeAddress)
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 FCFCDCBodyConsigneeAddress) 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 FCFCDCBodyConsigneeAddress
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 FCFCDCBodyAcquirer
#Region "Private fields"
Private _identification As FCFCDCBodyAcquirerIdentification
Private _name As String
Private _taxNumber As String
Private _address As FCFCDCBodyAcquirerAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDCBodyAcquirerAddress()
Me._identification = New FCFCDCBodyAcquirerIdentification()
End Sub
Public Property Identification() As FCFCDCBodyAcquirerIdentification
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 FCFCDCBodyAcquirerAddress
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(FCFCDCBodyAcquirer))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyAcquirer 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 FCFCDCBodyAcquirer object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyAcquirer 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 FCFCDCBodyAcquirer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyAcquirer)
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 FCFCDCBodyAcquirer) 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 FCFCDCBodyAcquirer
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyAcquirer)
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 FCFCDCBodyAcquirer
Return CType(Serializer.Deserialize(s), FCFCDCBodyAcquirer)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyAcquirer 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 FCFCDCBodyAcquirer object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyAcquirer 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 FCFCDCBodyAcquirer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyAcquirer)
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 FCFCDCBodyAcquirer) 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 FCFCDCBodyAcquirer
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 FCFCDCBodyAcquirerIdentification
#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(FCFCDCBodyAcquirerIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyAcquirerIdentification 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 FCFCDCBodyAcquirerIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyAcquirerIdentification 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 FCFCDCBodyAcquirerIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyAcquirerIdentification)
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 FCFCDCBodyAcquirerIdentification) 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 FCFCDCBodyAcquirerIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyAcquirerIdentification)
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 FCFCDCBodyAcquirerIdentification
Return CType(Serializer.Deserialize(s), FCFCDCBodyAcquirerIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyAcquirerIdentification 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 FCFCDCBodyAcquirerIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyAcquirerIdentification 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 FCFCDCBodyAcquirerIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyAcquirerIdentification)
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 FCFCDCBodyAcquirerIdentification) 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 FCFCDCBodyAcquirerIdentification
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 FCFCDCBodyAcquirerAddress
#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(FCFCDCBodyAcquirerAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyAcquirerAddress 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 FCFCDCBodyAcquirerAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyAcquirerAddress 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 FCFCDCBodyAcquirerAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyAcquirerAddress)
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 FCFCDCBodyAcquirerAddress) 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 FCFCDCBodyAcquirerAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyAcquirerAddress)
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 FCFCDCBodyAcquirerAddress
Return CType(Serializer.Deserialize(s), FCFCDCBodyAcquirerAddress)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyAcquirerAddress 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 FCFCDCBodyAcquirerAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyAcquirerAddress 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 FCFCDCBodyAcquirerAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyAcquirerAddress)
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 FCFCDCBodyAcquirerAddress) 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 FCFCDCBodyAcquirerAddress
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 FCFCDCBodyContainers
#Region "Private fields"
Private _containerFlag As String
Private _container As List(Of FCFCDCBodyContainersContainer)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._container = New List(Of FCFCDCBodyContainersContainer)()
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 FCFCDCBodyContainersContainer)
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(FCFCDCBodyContainers))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyContainers 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 FCFCDCBodyContainers object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyContainers 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 FCFCDCBodyContainers, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyContainers)
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 FCFCDCBodyContainers) 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 FCFCDCBodyContainers
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyContainers)
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 FCFCDCBodyContainers
Return CType(Serializer.Deserialize(s), FCFCDCBodyContainers)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyContainers 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 FCFCDCBodyContainers object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyContainers 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 FCFCDCBodyContainers, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyContainers)
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 FCFCDCBodyContainers) 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 FCFCDCBodyContainers
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 FCFCDCBodyContainersContainer
#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(FCFCDCBodyContainersContainer))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyContainersContainer 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 FCFCDCBodyContainersContainer object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyContainersContainer 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 FCFCDCBodyContainersContainer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyContainersContainer)
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 FCFCDCBodyContainersContainer) 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 FCFCDCBodyContainersContainer
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyContainersContainer)
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 FCFCDCBodyContainersContainer
Return CType(Serializer.Deserialize(s), FCFCDCBodyContainersContainer)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyContainersContainer 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 FCFCDCBodyContainersContainer object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyContainersContainer 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 FCFCDCBodyContainersContainer, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyContainersContainer)
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 FCFCDCBodyContainersContainer) 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 FCFCDCBodyContainersContainer
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 FCFCDCBodyDeliveryTerms
#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(FCFCDCBodyDeliveryTerms))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyDeliveryTerms 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 FCFCDCBodyDeliveryTerms object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyDeliveryTerms 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 FCFCDCBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyDeliveryTerms)
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 FCFCDCBodyDeliveryTerms) 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 FCFCDCBodyDeliveryTerms
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyDeliveryTerms)
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 FCFCDCBodyDeliveryTerms
Return CType(Serializer.Deserialize(s), FCFCDCBodyDeliveryTerms)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyDeliveryTerms 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 FCFCDCBodyDeliveryTerms object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyDeliveryTerms 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 FCFCDCBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyDeliveryTerms)
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 FCFCDCBodyDeliveryTerms) 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 FCFCDCBodyDeliveryTerms
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 FCFCDCBodyPaymentTransaction
#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(FCFCDCBodyPaymentTransaction))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyPaymentTransaction 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 FCFCDCBodyPaymentTransaction object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyPaymentTransaction 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 FCFCDCBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyPaymentTransaction)
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 FCFCDCBodyPaymentTransaction) 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 FCFCDCBodyPaymentTransaction
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyPaymentTransaction)
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 FCFCDCBodyPaymentTransaction
Return CType(Serializer.Deserialize(s), FCFCDCBodyPaymentTransaction)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyPaymentTransaction 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 FCFCDCBodyPaymentTransaction object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyPaymentTransaction 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 FCFCDCBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyPaymentTransaction)
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 FCFCDCBodyPaymentTransaction) 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 FCFCDCBodyPaymentTransaction
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 FCFCDCBodyForeignTradeStatistics
#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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._entryCustomsOffice = New FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice()
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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice
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(FCFCDCBodyForeignTradeStatistics))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyForeignTradeStatistics 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 FCFCDCBodyForeignTradeStatistics object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyForeignTradeStatistics 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 FCFCDCBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyForeignTradeStatistics)
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 FCFCDCBodyForeignTradeStatistics) 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 FCFCDCBodyForeignTradeStatistics
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyForeignTradeStatistics)
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 FCFCDCBodyForeignTradeStatistics
Return CType(Serializer.Deserialize(s), FCFCDCBodyForeignTradeStatistics)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyForeignTradeStatistics 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 FCFCDCBodyForeignTradeStatistics object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyForeignTradeStatistics 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 FCFCDCBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyForeignTradeStatistics)
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 FCFCDCBodyForeignTradeStatistics) 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 FCFCDCBodyForeignTradeStatistics
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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice
#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(FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice)
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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice)
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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice
Return CType(Serializer.Deserialize(s), FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice)
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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDCBodyForeignTradeStatisticsEntryCustomsOffice
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 FCFCDCBodyCustomsValue
#Region "Private fields"
Private _formerDecisions As String
Private _vendor As FCFCDCBodyCustomsValueVendor
Private _vendee As FCFCDCBodyCustomsValueVendee
Private _affiliation As FCFCDCBodyCustomsValueAffiliation
Private _restrictionOrCondition As FCFCDCBodyCustomsValueRestrictionOrCondition
Private _licenseFee As FCFCDCBodyCustomsValueLicenseFee
Private _resale As FCFCDCBodyCustomsValueResale
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._resale = New FCFCDCBodyCustomsValueResale()
Me._licenseFee = New FCFCDCBodyCustomsValueLicenseFee()
Me._restrictionOrCondition = New FCFCDCBodyCustomsValueRestrictionOrCondition()
Me._affiliation = New FCFCDCBodyCustomsValueAffiliation()
Me._vendee = New FCFCDCBodyCustomsValueVendee()
Me._vendor = New FCFCDCBodyCustomsValueVendor()
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 FCFCDCBodyCustomsValueVendor
Get
Return Me._vendor
End Get
Set
Me._vendor = Value
End Set
End Property
Public Property Vendee() As FCFCDCBodyCustomsValueVendee
Get
Return Me._vendee
End Get
Set
Me._vendee = Value
End Set
End Property
Public Property Affiliation() As FCFCDCBodyCustomsValueAffiliation
Get
Return Me._affiliation
End Get
Set
Me._affiliation = Value
End Set
End Property
Public Property RestrictionOrCondition() As FCFCDCBodyCustomsValueRestrictionOrCondition
Get
Return Me._restrictionOrCondition
End Get
Set
Me._restrictionOrCondition = Value
End Set
End Property
Public Property LicenseFee() As FCFCDCBodyCustomsValueLicenseFee
Get
Return Me._licenseFee
End Get
Set
Me._licenseFee = Value
End Set
End Property
Public Property Resale() As FCFCDCBodyCustomsValueResale
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(FCFCDCBodyCustomsValue))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValue 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 FCFCDCBodyCustomsValue object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValue 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 FCFCDCBodyCustomsValue, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValue)
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 FCFCDCBodyCustomsValue) 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 FCFCDCBodyCustomsValue
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValue)
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 FCFCDCBodyCustomsValue
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValue)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValue 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 FCFCDCBodyCustomsValue object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValue 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 FCFCDCBodyCustomsValue, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValue)
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 FCFCDCBodyCustomsValue) 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 FCFCDCBodyCustomsValue
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 FCFCDCBodyCustomsValueVendor
#Region "Private fields"
Private _identification As FCFCDCBodyCustomsValueVendorIdentification
Private _name As String
Private _address As FCFCDCBodyCustomsValueVendorAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDCBodyCustomsValueVendorAddress()
Me._identification = New FCFCDCBodyCustomsValueVendorIdentification()
End Sub
Public Property Identification() As FCFCDCBodyCustomsValueVendorIdentification
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 FCFCDCBodyCustomsValueVendorAddress
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(FCFCDCBodyCustomsValueVendor))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueVendor 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 FCFCDCBodyCustomsValueVendor object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueVendor 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 FCFCDCBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendor)
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 FCFCDCBodyCustomsValueVendor) 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 FCFCDCBodyCustomsValueVendor
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueVendor)
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 FCFCDCBodyCustomsValueVendor
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueVendor)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueVendor 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 FCFCDCBodyCustomsValueVendor object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueVendor 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 FCFCDCBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendor)
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 FCFCDCBodyCustomsValueVendor) 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 FCFCDCBodyCustomsValueVendor
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 FCFCDCBodyCustomsValueVendorIdentification
#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(FCFCDCBodyCustomsValueVendorIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueVendorIdentification 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 FCFCDCBodyCustomsValueVendorIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueVendorIdentification 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 FCFCDCBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendorIdentification)
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 FCFCDCBodyCustomsValueVendorIdentification) 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 FCFCDCBodyCustomsValueVendorIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueVendorIdentification)
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 FCFCDCBodyCustomsValueVendorIdentification
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueVendorIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueVendorIdentification 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 FCFCDCBodyCustomsValueVendorIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueVendorIdentification 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 FCFCDCBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendorIdentification)
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 FCFCDCBodyCustomsValueVendorIdentification) 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 FCFCDCBodyCustomsValueVendorIdentification
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 FCFCDCBodyCustomsValueVendorAddress
#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(FCFCDCBodyCustomsValueVendorAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueVendorAddress 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 FCFCDCBodyCustomsValueVendorAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueVendorAddress 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 FCFCDCBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendorAddress)
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 FCFCDCBodyCustomsValueVendorAddress) 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 FCFCDCBodyCustomsValueVendorAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueVendorAddress)
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 FCFCDCBodyCustomsValueVendorAddress
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueVendorAddress)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueVendorAddress 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 FCFCDCBodyCustomsValueVendorAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueVendorAddress 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 FCFCDCBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendorAddress)
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 FCFCDCBodyCustomsValueVendorAddress) 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 FCFCDCBodyCustomsValueVendorAddress
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 FCFCDCBodyCustomsValueVendee
#Region "Private fields"
Private _identification As FCFCDCBodyCustomsValueVendeeIdentification
Private _name As String
Private _address As FCFCDCBodyCustomsValueVendeeAddress
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._address = New FCFCDCBodyCustomsValueVendeeAddress()
Me._identification = New FCFCDCBodyCustomsValueVendeeIdentification()
End Sub
Public Property Identification() As FCFCDCBodyCustomsValueVendeeIdentification
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 FCFCDCBodyCustomsValueVendeeAddress
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(FCFCDCBodyCustomsValueVendee))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueVendee 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 FCFCDCBodyCustomsValueVendee object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueVendee 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 FCFCDCBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendee)
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 FCFCDCBodyCustomsValueVendee) 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 FCFCDCBodyCustomsValueVendee
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueVendee)
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 FCFCDCBodyCustomsValueVendee
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueVendee)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueVendee 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 FCFCDCBodyCustomsValueVendee object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueVendee 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 FCFCDCBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendee)
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 FCFCDCBodyCustomsValueVendee) 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 FCFCDCBodyCustomsValueVendee
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 FCFCDCBodyCustomsValueVendeeIdentification
#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(FCFCDCBodyCustomsValueVendeeIdentification))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueVendeeIdentification 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 FCFCDCBodyCustomsValueVendeeIdentification object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueVendeeIdentification 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 FCFCDCBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendeeIdentification)
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 FCFCDCBodyCustomsValueVendeeIdentification) 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 FCFCDCBodyCustomsValueVendeeIdentification
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueVendeeIdentification)
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 FCFCDCBodyCustomsValueVendeeIdentification
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueVendeeIdentification)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueVendeeIdentification 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 FCFCDCBodyCustomsValueVendeeIdentification object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueVendeeIdentification 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 FCFCDCBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendeeIdentification)
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 FCFCDCBodyCustomsValueVendeeIdentification) 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 FCFCDCBodyCustomsValueVendeeIdentification
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 FCFCDCBodyCustomsValueVendeeAddress
#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(FCFCDCBodyCustomsValueVendeeAddress))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueVendeeAddress 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 FCFCDCBodyCustomsValueVendeeAddress object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueVendeeAddress 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 FCFCDCBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendeeAddress)
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 FCFCDCBodyCustomsValueVendeeAddress) 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 FCFCDCBodyCustomsValueVendeeAddress
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueVendeeAddress)
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 FCFCDCBodyCustomsValueVendeeAddress
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueVendeeAddress)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueVendeeAddress 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 FCFCDCBodyCustomsValueVendeeAddress object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueVendeeAddress 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 FCFCDCBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueVendeeAddress)
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 FCFCDCBodyCustomsValueVendeeAddress) 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 FCFCDCBodyCustomsValueVendeeAddress
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 FCFCDCBodyCustomsValueAffiliation
#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(FCFCDCBodyCustomsValueAffiliation))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueAffiliation 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 FCFCDCBodyCustomsValueAffiliation object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueAffiliation 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 FCFCDCBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueAffiliation)
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 FCFCDCBodyCustomsValueAffiliation) 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 FCFCDCBodyCustomsValueAffiliation
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueAffiliation)
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 FCFCDCBodyCustomsValueAffiliation
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueAffiliation)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueAffiliation 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 FCFCDCBodyCustomsValueAffiliation object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueAffiliation 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 FCFCDCBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueAffiliation)
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 FCFCDCBodyCustomsValueAffiliation) 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 FCFCDCBodyCustomsValueAffiliation
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 FCFCDCBodyCustomsValueRestrictionOrCondition
#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(FCFCDCBodyCustomsValueRestrictionOrCondition))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueRestrictionOrCondition 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 FCFCDCBodyCustomsValueRestrictionOrCondition object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueRestrictionOrCondition 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 FCFCDCBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueRestrictionOrCondition)
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 FCFCDCBodyCustomsValueRestrictionOrCondition) 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 FCFCDCBodyCustomsValueRestrictionOrCondition
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueRestrictionOrCondition)
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 FCFCDCBodyCustomsValueRestrictionOrCondition
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueRestrictionOrCondition)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueRestrictionOrCondition 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 FCFCDCBodyCustomsValueRestrictionOrCondition object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueRestrictionOrCondition 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 FCFCDCBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueRestrictionOrCondition)
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 FCFCDCBodyCustomsValueRestrictionOrCondition) 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 FCFCDCBodyCustomsValueRestrictionOrCondition
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 FCFCDCBodyCustomsValueLicenseFee
#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(FCFCDCBodyCustomsValueLicenseFee))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueLicenseFee 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 FCFCDCBodyCustomsValueLicenseFee object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueLicenseFee 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 FCFCDCBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueLicenseFee)
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 FCFCDCBodyCustomsValueLicenseFee) 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 FCFCDCBodyCustomsValueLicenseFee
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueLicenseFee)
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 FCFCDCBodyCustomsValueLicenseFee
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueLicenseFee)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueLicenseFee 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 FCFCDCBodyCustomsValueLicenseFee object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueLicenseFee 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 FCFCDCBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueLicenseFee)
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 FCFCDCBodyCustomsValueLicenseFee) 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 FCFCDCBodyCustomsValueLicenseFee
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 FCFCDCBodyCustomsValueResale
#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(FCFCDCBodyCustomsValueResale))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyCustomsValueResale 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 FCFCDCBodyCustomsValueResale object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyCustomsValueResale 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 FCFCDCBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueResale)
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 FCFCDCBodyCustomsValueResale) 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 FCFCDCBodyCustomsValueResale
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyCustomsValueResale)
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 FCFCDCBodyCustomsValueResale
Return CType(Serializer.Deserialize(s), FCFCDCBodyCustomsValueResale)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyCustomsValueResale 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 FCFCDCBodyCustomsValueResale object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyCustomsValueResale 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 FCFCDCBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyCustomsValueResale)
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 FCFCDCBodyCustomsValueResale) 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 FCFCDCBodyCustomsValueResale
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 FCFCDCBodyDocument
#Region "Private fields"
Private _division As FCFCDCBodyDocumentDivision
Private _type As String
Private _referenceNumber As String
Private _issuingDate As Date
Private Shared sSerializer As XmlSerializer
#End Region
Public Property Division() As FCFCDCBodyDocumentDivision
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(FCFCDCBodyDocument))
End If
Return sSerializer
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serializes current FCFCDCBodyDocument 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 FCFCDCBodyDocument object
'''
''' string workflow markup to deserialize
''' Output FCFCDCBodyDocument 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 FCFCDCBodyDocument, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyDocument)
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 FCFCDCBodyDocument) 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 FCFCDCBodyDocument
Dim stringReader As System.IO.StringReader = Nothing
Try
stringReader = New System.IO.StringReader(input)
Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), FCFCDCBodyDocument)
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 FCFCDCBodyDocument
Return CType(Serializer.Deserialize(s), FCFCDCBodyDocument)
End Function
#End Region
'''
''' Serializes current FCFCDCBodyDocument 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 FCFCDCBodyDocument object
'''
''' string xml file to load and deserialize
''' Output FCFCDCBodyDocument 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 FCFCDCBodyDocument, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FCFCDCBodyDocument)
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 FCFCDCBodyDocument) 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 FCFCDCBodyDocument
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 FCFCDCBodyDocumentDivision
'''
Item4
End Enum
Partial Public Class FCFCDCBodyGoodsItem
#Region "Private fields"
Private _sequenceNumber As String
Private _procedure As FCFCDCBodyGoodsItemProcedure
Private _eUCode As String
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 FCFCDCBodyGoodsItemCommodityCode
Private _supplementaryCodes As List(Of FCFCDCBodyGoodsItemSupplementaryCodes)
Private _package As FCFCDCBodyGoodsItemPackage
Private _foreignTradeStatistics As FCFCDCBodyGoodsItemForeignTradeStatistics
Private _customsValue As FCFCDCBodyGoodsItemCustomsValue
Private _assessment As FCFCDCBodyGoodsItemAssessment
Private _exciseDuty As List(Of FCFCDCBodyGoodsItemExciseDuty)
Private _preferentialTreatment As FCFCDCBodyGoodsItemPreferentialTreatment
Private _outwardProcessingReduction As List(Of FCFCDCBodyGoodsItemOutwardProcessingReduction)
Private _specialCase As List(Of FCFCDCBodyGoodsItemSpecialCase)
Private _document As List(Of FCFCDCBodyGoodsItemDocument)
Private Shared sSerializer As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._document = New List(Of FCFCDCBodyGoodsItemDocument)()
Me._specialCase = New List(Of FCFCDCBodyGoodsItemSpecialCase)()
Me._outwardProcessingReduction = New List(Of FCFCDCBodyGoodsItemOutwardProcessingReduction)()
Me._preferentialTreatment = New FCFCDCBodyGoodsItemPreferentialTreatment()
Me._exciseDuty = New List(Of FCFCDCBodyGoodsItemExciseDuty)()
Me._assessment = New FCFCDCBodyGoodsItemAssessment()
Me._customsValue = New FCFCDCBodyGoodsItemCustomsValue()
Me._foreignTradeStatistics = New FCFCDCBodyGoodsItemForeignTradeStatistics()
Me._package = New FCFCDCBodyGoodsItemPackage()
Me._supplementaryCodes = New List(Of FCFCDCBodyGoodsItemSupplementaryCodes)()
Me._commodityCode = New FCFCDCBodyGoodsItemCommodityCode()
Me._procedure = New FCFCDCBodyGoodsItemProcedure()
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 FCFCDCBodyGoodsItemProcedure
Get
Return Me._procedure
End Get
Set
Me._procedure = Value
End Set
End Property
Public Property EUCode() As String
Get
Return Me._eUCode
End Get
Set
Me._eUCode = 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