'' ------------------------------------------------------------------------------
''  <auto-generated>
''    Generated by Xsd2Code++. Version 4.4.0.7
''    <NameSpace>DEXPCC</NameSpace><Collection>List</Collection><codeType>VisualBasic</codeType><EnableDataBinding>False</EnableDataBinding><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><DataMemberNameArg>OnlyIfDifferent</DataMemberNameArg><DataMemberOnXmlIgnore>False</DataMemberOnXmlIgnore><CodeBaseTag>Net45</CodeBaseTag><InitializeFields>All</InitializeFields><GenerateUnusedComplexTypes>True</GenerateUnusedComplexTypes><GenerateUnusedSimpleTypes>True</GenerateUnusedSimpleTypes><GenerateXMLAttributes>True</GenerateXMLAttributes><OrderXMLAttrib>False</OrderXMLAttrib><EnableLazyLoading>False</EnableLazyLoading><VirtualProp>False</VirtualProp><PascalCase>False</PascalCase><AutomaticProperties>False</AutomaticProperties><PropNameSpecified>None</PropNameSpecified><PrivateFieldName>StartWithUnderscore</PrivateFieldName><PrivateFieldNamePrefix></PrivateFieldNamePrefix><EnableRestriction>False</EnableRestriction><RestrictionMaxLenght>False</RestrictionMaxLenght><RestrictionRegEx>False</RestrictionRegEx><RestrictionRange>False</RestrictionRange><ValidateProperty>False</ValidateProperty><ClassNamePrefix></ClassNamePrefix><ClassLevel>Public</ClassLevel><PartialClass>True</PartialClass><ClassesInSeparateFiles>False</ClassesInSeparateFiles><ClassesInSeparateFilesDir></ClassesInSeparateFilesDir><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><EnableAppInfoSettings>False</EnableAppInfoSettings><EnableExternalSchemasCache>False</EnableExternalSchemasCache><EnableDebug>False</EnableDebug><EnableWarn>True</EnableWarn><ExcludeImportedTypes>True</ExcludeImportedTypes><ExpandNesteadAttributeGroup>True</ExpandNesteadAttributeGroup><CleanupCode>False</CleanupCode><EnableXmlSerialization>True</EnableXmlSerialization><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><EnableEncoding>False</EnableEncoding><EnableXMLIndent>True</EnableXMLIndent><IndentChar>Indent2Space</IndentChar><NewLineAttr>False</NewLineAttr><OmitXML>False</OmitXML><Encoder>UTF8</Encoder><Serializer>XmlSerializer</Serializer><sspNullable>False</sspNullable><sspString>False</sspString><sspCollection>False</sspCollection><sspComplexType>False</sspComplexType><sspSimpleType>False</sspSimpleType><sspEnumType>False</sspEnumType><XmlSerializerEvent>False</XmlSerializerEvent><BaseClassName>EntityBase</BaseClassName><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><CustomUsings></CustomUsings><AttributesToExlude></AttributesToExlude>
''  </auto-generated>
'' ------------------------------------------------------------------------------
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 DEXPCC

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=False)> _
    Partial Public Class DEXPCC

#Region "Private fields"
        Private _interchangeSender As DEXPCCInterchangeSender

        Private _interchangeRecipient As DEXPCCInterchangeRecipient

        Private _preparation As DEXPCCPreparation

        Private _interchangeControlReference As String

        Private _messageGroup As DEXPCCMessageGroup

        Private _messageReferenceNumber As String

        Private _messageType As DEXPCCMessageType

        Private _messageIdentifier As String

        Private _header As DEXPCCHeader

        Private _exportCustomsOffice As DEXPCCExportCustomsOffice

        Private _declarant As DEXPCCDeclarant

        Private _representative As DEXPCCRepresentative

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._representative = New DEXPCCRepresentative()
            Me._declarant = New DEXPCCDeclarant()
            Me._exportCustomsOffice = New DEXPCCExportCustomsOffice()
            Me._header = New DEXPCCHeader()
            Me._preparation = New DEXPCCPreparation()
            Me._interchangeRecipient = New DEXPCCInterchangeRecipient()
            Me._interchangeSender = New DEXPCCInterchangeSender()
        End Sub

        Public Property InterchangeSender() As DEXPCCInterchangeSender
            Get
                Return Me._interchangeSender
            End Get
            Set(value As DEXPCCInterchangeSender)
                Me._interchangeSender = Value
            End Set
        End Property

        Public Property InterchangeRecipient() As DEXPCCInterchangeRecipient
            Get
                Return Me._interchangeRecipient
            End Get
            Set(value As DEXPCCInterchangeRecipient)
                Me._interchangeRecipient = Value
            End Set
        End Property

        Public Property Preparation() As DEXPCCPreparation
            Get
                Return Me._preparation
            End Get
            Set(value As DEXPCCPreparation)
                Me._preparation = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property InterchangeControlReference() As String
            Get
                Return Me._interchangeControlReference
            End Get
            Set(value As String)
                Me._interchangeControlReference = Value
            End Set
        End Property

        Public Property MessageGroup() As DEXPCCMessageGroup
            Get
                Return Me._messageGroup
            End Get
            Set(value As DEXPCCMessageGroup)
                Me._messageGroup = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="integer")> _
        Public Property MessageReferenceNumber() As String
            Get
                Return Me._messageReferenceNumber
            End Get
            Set(value As String)
                Me._messageReferenceNumber = Value
            End Set
        End Property

        Public Property MessageType() As DEXPCCMessageType
            Get
                Return Me._messageType
            End Get
            Set(value As DEXPCCMessageType)
                Me._messageType = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MessageIdentifier() As String
            Get
                Return Me._messageIdentifier
            End Get
            Set(value As String)
                Me._messageIdentifier = Value
            End Set
        End Property

        Public Property Header() As DEXPCCHeader
            Get
                Return Me._header
            End Get
            Set(value As DEXPCCHeader)
                Me._header = Value
            End Set
        End Property

        Public Property ExportCustomsOffice() As DEXPCCExportCustomsOffice
            Get
                Return Me._exportCustomsOffice
            End Get
            Set(value As DEXPCCExportCustomsOffice)
                Me._exportCustomsOffice = Value
            End Set
        End Property

        Public Property Declarant() As DEXPCCDeclarant
            Get
                Return Me._declarant
            End Get
            Set(value As DEXPCCDeclarant)
                Me._declarant = Value
            End Set
        End Property

        Public Property Representative() As DEXPCCRepresentative
            Get
                Return Me._representative
            End Get
            Set(value As DEXPCCRepresentative)
                Me._representative = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCC))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCC object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCC object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCC object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCC, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCC)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCC) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCC
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCC)
            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 DEXPCC
            Return CType(Serializer.Deserialize(s), DEXPCC)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCC object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCC object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCC object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCC, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCC)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCC) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCC
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCInterchangeSender

#Region "Private fields"
        Private _identification As DEXPCCInterchangeSenderIdentification

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._identification = New DEXPCCInterchangeSenderIdentification()
        End Sub

        Public Property Identification() As DEXPCCInterchangeSenderIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPCCInterchangeSenderIdentification)
                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(DEXPCCInterchangeSender))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCInterchangeSender object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCInterchangeSender object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeSender object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeSender, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeSender)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeSender) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCInterchangeSender
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCInterchangeSender)
            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 DEXPCCInterchangeSender
            Return CType(Serializer.Deserialize(s), DEXPCCInterchangeSender)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCInterchangeSender object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCInterchangeSender object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeSender object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeSender, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeSender)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeSender) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCInterchangeSender
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCInterchangeSenderIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCCInterchangeSenderIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCInterchangeSenderIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCInterchangeSenderIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeSenderIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeSenderIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeSenderIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCInterchangeSenderIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCInterchangeSenderIdentification)
            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 DEXPCCInterchangeSenderIdentification
            Return CType(Serializer.Deserialize(s), DEXPCCInterchangeSenderIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCInterchangeSenderIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCInterchangeSenderIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeSenderIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeSenderIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeSenderIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCInterchangeSenderIdentification
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCInterchangeRecipient

#Region "Private fields"
        Private _identification As DEXPCCInterchangeRecipientIdentification

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._identification = New DEXPCCInterchangeRecipientIdentification()
        End Sub

        Public Property Identification() As DEXPCCInterchangeRecipientIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPCCInterchangeRecipientIdentification)
                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(DEXPCCInterchangeRecipient))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCInterchangeRecipient object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCInterchangeRecipient object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeRecipient object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeRecipient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeRecipient)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeRecipient) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCInterchangeRecipient
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCInterchangeRecipient)
            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 DEXPCCInterchangeRecipient
            Return CType(Serializer.Deserialize(s), DEXPCCInterchangeRecipient)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCInterchangeRecipient object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCInterchangeRecipient object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeRecipient object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeRecipient, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeRecipient)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeRecipient) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCInterchangeRecipient
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCInterchangeRecipientIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCCInterchangeRecipientIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCInterchangeRecipientIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCInterchangeRecipientIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeRecipientIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeRecipientIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCInterchangeRecipientIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCInterchangeRecipientIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCInterchangeRecipientIdentification)
            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 DEXPCCInterchangeRecipientIdentification
            Return CType(Serializer.Deserialize(s), DEXPCCInterchangeRecipientIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCInterchangeRecipientIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCInterchangeRecipientIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCInterchangeRecipientIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCInterchangeRecipientIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCInterchangeRecipientIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCInterchangeRecipientIdentification
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCPreparation

#Region "Private fields"
        Private _date As Date

        Private _time As Date

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property [Date]() As Date
            Get
                Return Me._date
            End Get
            Set(value As Date)
                Me._date = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="time")> _
        Public Property Time() As Date
            Get
                Return Me._time
            End Get
            Set(value As Date)
                Me._time = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCCPreparation))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCPreparation object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCPreparation object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCPreparation object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCPreparation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCPreparation)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCPreparation) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCPreparation
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCPreparation)
            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 DEXPCCPreparation
            Return CType(Serializer.Deserialize(s), DEXPCCPreparation)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCPreparation object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCPreparation object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCPreparation object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCPreparation, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCPreparation)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCPreparation) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCPreparation
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPCCMessageGroup

        '''<remarks/>
        EXP
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPCCMessageType

        '''<remarks/>
        DEXPCC
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCHeader

#Region "Private fields"
        Private _movementReferenceNumber As String

        Private _messageVersion As String

        Private _cancellationDateTime As Date

        Private _cancellationType As DEXPCCHeaderCancellationType

        Private _cancellationReason As String

        Private _authorizationNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MovementReferenceNumber() As String
            Get
                Return Me._movementReferenceNumber
            End Get
            Set(value As String)
                Me._movementReferenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property MessageVersion() As String
            Get
                Return Me._messageVersion
            End Get
            Set(value As String)
                Me._messageVersion = Value
            End Set
        End Property

        Public Property CancellationDateTime() As Date
            Get
                Return Me._cancellationDateTime
            End Get
            Set(value As Date)
                Me._cancellationDateTime = Value
            End Set
        End Property

        Public Property CancellationType() As DEXPCCHeaderCancellationType
            Get
                Return Me._cancellationType
            End Get
            Set(value As DEXPCCHeaderCancellationType)
                Me._cancellationType = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property CancellationReason() As String
            Get
                Return Me._cancellationReason
            End Get
            Set(value As String)
                Me._cancellationReason = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property AuthorizationNumber() As String
            Get
                Return Me._authorizationNumber
            End Get
            Set(value As String)
                Me._authorizationNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCCHeader))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCHeader object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCHeader object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCHeader object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCHeader, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCHeader)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCHeader) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCHeader
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCHeader)
            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 DEXPCCHeader
            Return CType(Serializer.Deserialize(s), DEXPCCHeader)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCHeader object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCHeader object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCHeader object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCHeader, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCHeader)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCHeader) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCHeader
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPCCHeaderCancellationType

        '''<remarks/>
        SV
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCExportCustomsOffice

#Region "Private fields"
        Private _referenceNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCCExportCustomsOffice))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCExportCustomsOffice object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCExportCustomsOffice object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCExportCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCExportCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCExportCustomsOffice)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCExportCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCExportCustomsOffice
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCExportCustomsOffice)
            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 DEXPCCExportCustomsOffice
            Return CType(Serializer.Deserialize(s), DEXPCCExportCustomsOffice)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCExportCustomsOffice object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCExportCustomsOffice object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCExportCustomsOffice object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCExportCustomsOffice, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCExportCustomsOffice)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCExportCustomsOffice) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCExportCustomsOffice
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCDeclarant

#Region "Private fields"
        Private _class As DEXPCCDeclarantClass

        Private _identification As DEXPCCDeclarantIdentification

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._identification = New DEXPCCDeclarantIdentification()
        End Sub

        Public Property [Class]() As DEXPCCDeclarantClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPCCDeclarantClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPCCDeclarantIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPCCDeclarantIdentification)
                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(DEXPCCDeclarant))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCDeclarant object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCDeclarant object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCDeclarant object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCDeclarant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCDeclarant)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCDeclarant) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCDeclarant
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCDeclarant)
            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 DEXPCCDeclarant
            Return CType(Serializer.Deserialize(s), DEXPCCDeclarant)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCDeclarant object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCDeclarant object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCDeclarant object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCDeclarant, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCDeclarant)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCDeclarant) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCDeclarant
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPCCDeclarantClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCDeclarantIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCCDeclarantIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCDeclarantIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCDeclarantIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCDeclarantIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCDeclarantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCDeclarantIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCDeclarantIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCDeclarantIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCDeclarantIdentification)
            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 DEXPCCDeclarantIdentification
            Return CType(Serializer.Deserialize(s), DEXPCCDeclarantIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCDeclarantIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCDeclarantIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCDeclarantIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCDeclarantIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCDeclarantIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCDeclarantIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCDeclarantIdentification
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCRepresentative

#Region "Private fields"
        Private _class As DEXPCCRepresentativeClass

        Private _identification As DEXPCCRepresentativeIdentification

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._identification = New DEXPCCRepresentativeIdentification()
        End Sub

        Public Property [Class]() As DEXPCCRepresentativeClass
            Get
                Return Me._class
            End Get
            Set(value As DEXPCCRepresentativeClass)
                Me._class = Value
            End Set
        End Property

        Public Property Identification() As DEXPCCRepresentativeIdentification
            Get
                Return Me._identification
            End Get
            Set(value As DEXPCCRepresentativeIdentification)
                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(DEXPCCRepresentative))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCRepresentative object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCRepresentative object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCRepresentative object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCRepresentative, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCRepresentative)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCRepresentative) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCRepresentative
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCRepresentative)
            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 DEXPCCRepresentative
            Return CType(Serializer.Deserialize(s), DEXPCCRepresentative)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCRepresentative object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCRepresentative object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCRepresentative object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCRepresentative, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCRepresentative)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCRepresentative) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCRepresentative
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Public Enum DEXPCCRepresentativeClass

        '''<remarks/>
        <System.Xml.Serialization.XmlEnumAttribute("2")> _
        Item2
    End Enum

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True)> _
    Partial Public Class DEXPCCRepresentativeIdentification

#Region "Private fields"
        Private _referenceNumber As String

        Private _subsidiaryNumber As String

        Private Shared sSerializer As XmlSerializer
#End Region

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property ReferenceNumber() As String
            Get
                Return Me._referenceNumber
            End Get
            Set(value As String)
                Me._referenceNumber = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlElementAttribute(DataType:="token")> _
        Public Property SubsidiaryNumber() As String
            Get
                Return Me._subsidiaryNumber
            End Get
            Set(value As String)
                Me._subsidiaryNumber = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DEXPCCRepresentativeIdentification))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current DEXPCCRepresentativeIdentification object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an DEXPCCRepresentativeIdentification object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output DEXPCCRepresentativeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCRepresentativeIdentification)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPCCRepresentativeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPCCRepresentativeIdentification
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DEXPCCRepresentativeIdentification)
            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 DEXPCCRepresentativeIdentification
            Return CType(Serializer.Deserialize(s), DEXPCCRepresentativeIdentification)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current DEXPCCRepresentativeIdentification object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an DEXPCCRepresentativeIdentification object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output DEXPCCRepresentativeIdentification object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCRepresentativeIdentification, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, DEXPCCRepresentativeIdentification)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPCCRepresentativeIdentification) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPCCRepresentativeIdentification
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=True)> _
    Partial Public Class [decimal]

#Region "Private fields"
        Private _anyAttr As List(Of System.Xml.XmlAttribute)

        Private _value As Decimal

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._anyAttr = New List(Of System.Xml.XmlAttribute)()
        End Sub

        <System.Xml.Serialization.XmlAnyAttributeAttribute()> _
        Public Property AnyAttr() As List(Of System.Xml.XmlAttribute)
            Get
                Return Me._anyAttr
            End Get
            Set(value As List(Of System.Xml.XmlAttribute))
                Me._anyAttr = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlTextAttribute()> _
        Public Property Value() As Decimal
            Get
                Return Me._value
            End Get
            Set(value As Decimal)
                Me._value = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType([decimal]))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current decimal object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an decimal object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output decimal object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [decimal], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [decimal])
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [decimal]) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As [decimal]
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), [decimal])
            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 [decimal]
            Return CType(Serializer.Deserialize(s), [decimal])
        End Function
#End Region

        ''' <summary>
        ''' Serializes current decimal object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an decimal object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output decimal object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [decimal], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [decimal])
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [decimal]) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As [decimal]
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=True)> _
    Partial Public Class [integer]

#Region "Private fields"
        Private _anyAttr As List(Of System.Xml.XmlAttribute)

        Private _value As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._anyAttr = New List(Of System.Xml.XmlAttribute)()
        End Sub

        <System.Xml.Serialization.XmlAnyAttributeAttribute()> _
        Public Property AnyAttr() As List(Of System.Xml.XmlAttribute)
            Get
                Return Me._anyAttr
            End Get
            Set(value As List(Of System.Xml.XmlAttribute))
                Me._anyAttr = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlTextAttribute(DataType:="integer")> _
        Public Property Value() As String
            Get
                Return Me._value
            End Get
            Set(value As String)
                Me._value = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType([integer]))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current integer object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an integer object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output integer object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [integer], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [integer])
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As [integer]) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As [integer]
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), [integer])
            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 [integer]
            Return CType(Serializer.Deserialize(s), [integer])
        End Function
#End Region

        ''' <summary>
        ''' Serializes current integer object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an integer object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output integer object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [integer], ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, [integer])
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As [integer]) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As [integer]
            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

    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
     System.SerializableAttribute(), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=True)> _
    Partial Public Class token

#Region "Private fields"
        Private _anyAttr As List(Of System.Xml.XmlAttribute)

        Private _value As String

        Private Shared sSerializer As XmlSerializer
#End Region

        Public Sub New()
            MyBase.New()
            Me._anyAttr = New List(Of System.Xml.XmlAttribute)()
        End Sub

        <System.Xml.Serialization.XmlAnyAttributeAttribute()> _
        Public Property AnyAttr() As List(Of System.Xml.XmlAttribute)
            Get
                Return Me._anyAttr
            End Get
            Set(value As List(Of System.Xml.XmlAttribute))
                Me._anyAttr = Value
            End Set
        End Property

        <System.Xml.Serialization.XmlTextAttribute(DataType:="token")> _
        Public Property Value() As String
            Get
                Return Me._value
            End Get
            Set(value As String)
                Me._value = Value
            End Set
        End Property

        Private Shared ReadOnly Property Serializer() As XmlSerializer
            Get
                If (sSerializer Is Nothing) Then
                    sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(token))
                End If
                Return sSerializer
            End Get
        End Property

#Region "Serialize/Deserialize"
        ''' <summary>
        ''' Serializes current token object into an XML string
        ''' </summary>
        ''' <returns>string XML value</returns>
        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

        ''' <summary>
        ''' Deserializes workflow markup into an token object
        ''' </summary>
        ''' <param name="input">string workflow markup to deserialize</param>
        ''' <param name="obj">Output token object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As token, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, token)
            Try
                obj = Deserialize(input)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As token) As Boolean
            Dim exception As System.Exception = Nothing
            Return Deserialize(input, obj, exception)
        End Function

        Public Overloads Shared Function Deserialize(ByVal input As String) As token
            Dim stringReader As System.IO.StringReader = Nothing
            Try
                stringReader = New System.IO.StringReader(input)
                Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), token)
            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 token
            Return CType(Serializer.Deserialize(s), token)
        End Function
#End Region

        ''' <summary>
        ''' Serializes current token object into file
        ''' </summary>
        ''' <param name="fileName">full path of outupt xml file</param>
        ''' <param name="exception">output Exception value if failed</param>
        ''' <returns>true if can serialize and save into file; otherwise, false</returns>
        Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            Try
                SaveToFile(fileName)
                Return True
            Catch 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

        ''' <summary>
        ''' Deserializes xml markup from file into an token object
        ''' </summary>
        ''' <param name="fileName">string xml file to load and deserialize</param>
        ''' <param name="obj">Output token object</param>
        ''' <param name="exception">output Exception value if deserialize failed</param>
        ''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As token, ByRef exception As System.Exception) As Boolean
            exception = Nothing
            obj = CType(Nothing, token)
            Try
                obj = LoadFromFile(fileName)
                Return True
            Catch ex As System.Exception
                exception = ex
                Return False
            End Try
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As token) As Boolean
            Dim exception As System.Exception = Nothing
            Return LoadFromFile(fileName, obj, exception)
        End Function

        Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As token
            Dim file As System.IO.FileStream = Nothing
            Dim sr As System.IO.StreamReader = Nothing
            Try
                file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read)
                sr = New System.IO.StreamReader(file)
                Dim xmlString As String = sr.ReadToEnd
                sr.Close()
                file.Close()
                Return Deserialize(xmlString)
            Finally
                If (Not (file) Is Nothing) Then
                    file.Dispose()
                End If
                If (Not (sr) Is Nothing) Then
                    sr.Dispose()
                End If
            End Try
        End Function
    End Class
End Namespace
