'' ------------------------------------------------------------------------------ '' '' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com '' {"TargetFramework":"Net48","NameSpace":"CC305A_v10_0","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} '' '' ------------------------------------------------------------------------------ #Disable Warning Imports System Imports System.Diagnostics Imports System.Xml.Serialization Imports System.Runtime.Serialization Imports System.Collections Imports System.Xml.Schema Imports System.ComponentModel Imports System.Xml Imports System.IO Imports System.Text Imports System.Collections.Generic Namespace CC305A_v10_0 Partial Public Class CC305AType #Region "Private fields" Private _mesSenMES3 As String Private _mesRecMES6 As String Private _datOfPreMES9 As String Private _timOfPreMES10 As String Private _priMES15 As String Private _tesIndMES18 As Flag Private _mesIdeMES19 As String Private _mesTypMES20 As MessageTypes Private _corIdeMES25 As String Private _hEAHEA As HEAHEAType Private _fUNERRER1 As List(Of FUNERRER1Type) Private _tRAREP As TRAREPType Private _pERLODSUMDEC As PERLODSUMDECType Private _cUSOFFFENT730 As CUSOFFFENT730Type Private Shared _serializerXml As XmlSerializer #End Region Public Sub New() MyBase.New Me._cUSOFFFENT730 = New CUSOFFFENT730Type() Me._pERLODSUMDEC = New PERLODSUMDECType() Me._tRAREP = New TRAREPType() Me._fUNERRER1 = New List(Of FUNERRER1Type)() Me._hEAHEA = New HEAHEAType() End Sub Public Property MesSenMES3() As String Get Return Me._mesSenMES3 End Get Set Me._mesSenMES3 = Value End Set End Property Public Property MesRecMES6() As String Get Return Me._mesRecMES6 End Get Set Me._mesRecMES6 = Value End Set End Property Public Property DatOfPreMES9() As String Get Return Me._datOfPreMES9 End Get Set Me._datOfPreMES9 = Value End Set End Property Public Property TimOfPreMES10() As String Get Return Me._timOfPreMES10 End Get Set Me._timOfPreMES10 = Value End Set End Property Public Property PriMES15() As String Get Return Me._priMES15 End Get Set Me._priMES15 = Value End Set End Property Public Property TesIndMES18() As Flag Get Return Me._tesIndMES18 End Get Set Me._tesIndMES18 = Value End Set End Property Public Property MesIdeMES19() As String Get Return Me._mesIdeMES19 End Get Set Me._mesIdeMES19 = Value End Set End Property Public Property MesTypMES20() As MessageTypes Get Return Me._mesTypMES20 End Get Set Me._mesTypMES20 = Value End Set End Property Public Property CorIdeMES25() As String Get Return Me._corIdeMES25 End Get Set Me._corIdeMES25 = Value End Set End Property Public Property HEAHEA() As HEAHEAType Get Return Me._hEAHEA End Get Set Me._hEAHEA = Value End Set End Property Public Property FUNERRER1() As List(Of FUNERRER1Type) Get Return Me._fUNERRER1 End Get Set Me._fUNERRER1 = Value End Set End Property Public Property TRAREP() As TRAREPType Get Return Me._tRAREP End Get Set Me._tRAREP = Value End Set End Property Public Property PERLODSUMDEC() As PERLODSUMDECType Get Return Me._pERLODSUMDEC End Get Set Me._pERLODSUMDEC = Value End Set End Property Public Property CUSOFFFENT730() As CUSOFFFENT730Type Get Return Me._cUSOFFFENT730 End Get Set Me._cUSOFFFENT730 = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CC305AType)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize CC305AType object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New 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) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes CC305AType object ''' ''' string to deserialize ''' Output CC305AType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CC305AType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, CC305AType) 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 CC305AType) 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 CC305AType Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CC305AType) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As CC305AType Return CType(SerializerXml.Deserialize(s), CC305AType) End Function #End Region ''' ''' Serializes current CC305AType object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an CC305AType object ''' ''' File to load and deserialize ''' Output CC305AType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC305AType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, CC305AType) 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 CC305AType) 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 CC305AType Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum Flag Item0 Item1 End Enum Public Enum MessageTypes CC304A CC305A CC313A CC315A CC316A CC323A CC324A CC325A CC328A CC351A CD030C CD031C CD032C CD070B CD071B CD301A CD302A CD303A CD319A CD411C CD412C CD906B CD912B CD913B CD914B CD916B CD917B CD931C CD932C CD971B End Enum Partial Public Class HEAHEAType #Region "Private fields" Private _docNumHEA5 As String Private _ameRejMotCodHEA604 As String Private _ameRejMotTexHEA605 As String Private _ameRejMotTexHEA605LNG As String Private _datTimAmeHEA113 As String Private _ameRejDatTimHEA112 As String Private Shared _serializerXml As XmlSerializer #End Region Public Property DocNumHEA5() As String Get Return Me._docNumHEA5 End Get Set Me._docNumHEA5 = Value End Set End Property Public Property AmeRejMotCodHEA604() As String Get Return Me._ameRejMotCodHEA604 End Get Set Me._ameRejMotCodHEA604 = Value End Set End Property Public Property AmeRejMotTexHEA605() As String Get Return Me._ameRejMotTexHEA605 End Get Set Me._ameRejMotTexHEA605 = Value End Set End Property Public Property AmeRejMotTexHEA605LNG() As String Get Return Me._ameRejMotTexHEA605LNG End Get Set Me._ameRejMotTexHEA605LNG = Value End Set End Property Public Property DatTimAmeHEA113() As String Get Return Me._datTimAmeHEA113 End Get Set Me._datTimAmeHEA113 = Value End Set End Property Public Property AmeRejDatTimHEA112() As String Get Return Me._ameRejDatTimHEA112 End Get Set Me._ameRejDatTimHEA112 = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HEAHEAType)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize HEAHEAType object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New 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) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes HEAHEAType object ''' ''' string to deserialize ''' Output HEAHEAType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HEAHEAType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, HEAHEAType) 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 HEAHEAType) 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 HEAHEAType Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HEAHEAType) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As HEAHEAType Return CType(SerializerXml.Deserialize(s), HEAHEAType) End Function #End Region ''' ''' Serializes current HEAHEAType object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an HEAHEAType object ''' ''' File to load and deserialize ''' Output HEAHEAType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HEAHEAType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, HEAHEAType) 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 HEAHEAType) 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 HEAHEAType Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class CUSOFFFENT730Type #Region "Private fields" Private _refNumCUSOFFFENT731 As String Private Shared _serializerXml As XmlSerializer #End Region Public Property RefNumCUSOFFFENT731() As String Get Return Me._refNumCUSOFFFENT731 End Get Set Me._refNumCUSOFFFENT731 = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CUSOFFFENT730Type)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize CUSOFFFENT730Type object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New 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) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes CUSOFFFENT730Type object ''' ''' string to deserialize ''' Output CUSOFFFENT730Type object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CUSOFFFENT730Type, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, CUSOFFFENT730Type) 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 CUSOFFFENT730Type) 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 CUSOFFFENT730Type Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CUSOFFFENT730Type) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As CUSOFFFENT730Type Return CType(SerializerXml.Deserialize(s), CUSOFFFENT730Type) End Function #End Region ''' ''' Serializes current CUSOFFFENT730Type object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an CUSOFFFENT730Type object ''' ''' File to load and deserialize ''' Output CUSOFFFENT730Type object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CUSOFFFENT730Type, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, CUSOFFFENT730Type) 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 CUSOFFFENT730Type) 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 CUSOFFFENT730Type Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class PERLODSUMDECType #Region "Private fields" Private _namPLD1 As String Private _strAndNumPLD1 As String Private _posCodPLD1 As String Private _citPLD1 As String Private _couCodPLD1 As String Private _pERLODSUMDECLNG As String Private _tINPLD1 As String Private Shared _serializerXml As XmlSerializer #End Region Public Property NamPLD1() As String Get Return Me._namPLD1 End Get Set Me._namPLD1 = Value End Set End Property Public Property StrAndNumPLD1() As String Get Return Me._strAndNumPLD1 End Get Set Me._strAndNumPLD1 = Value End Set End Property Public Property PosCodPLD1() As String Get Return Me._posCodPLD1 End Get Set Me._posCodPLD1 = Value End Set End Property Public Property CitPLD1() As String Get Return Me._citPLD1 End Get Set Me._citPLD1 = Value End Set End Property Public Property CouCodPLD1() As String Get Return Me._couCodPLD1 End Get Set Me._couCodPLD1 = Value End Set End Property Public Property PERLODSUMDECLNG() As String Get Return Me._pERLODSUMDECLNG End Get Set Me._pERLODSUMDECLNG = Value End Set End Property Public Property TINPLD1() As String Get Return Me._tINPLD1 End Get Set Me._tINPLD1 = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PERLODSUMDECType)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize PERLODSUMDECType object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New 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) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes PERLODSUMDECType object ''' ''' string to deserialize ''' Output PERLODSUMDECType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PERLODSUMDECType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, PERLODSUMDECType) 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 PERLODSUMDECType) 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 PERLODSUMDECType Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PERLODSUMDECType) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As PERLODSUMDECType Return CType(SerializerXml.Deserialize(s), PERLODSUMDECType) End Function #End Region ''' ''' Serializes current PERLODSUMDECType object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an PERLODSUMDECType object ''' ''' File to load and deserialize ''' Output PERLODSUMDECType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PERLODSUMDECType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, PERLODSUMDECType) 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 PERLODSUMDECType) 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 PERLODSUMDECType Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class TRAREPType #Region "Private fields" Private _namTRE1 As String Private _strAndNumTRE1 As String Private _posCodTRE1 As String Private _citTRE1 As String Private _couCodTRE1 As String Private _tRAREPLNG As String Private _tINTRE1 As String Private Shared _serializerXml As XmlSerializer #End Region Public Property NamTRE1() As String Get Return Me._namTRE1 End Get Set Me._namTRE1 = Value End Set End Property Public Property StrAndNumTRE1() As String Get Return Me._strAndNumTRE1 End Get Set Me._strAndNumTRE1 = Value End Set End Property Public Property PosCodTRE1() As String Get Return Me._posCodTRE1 End Get Set Me._posCodTRE1 = Value End Set End Property Public Property CitTRE1() As String Get Return Me._citTRE1 End Get Set Me._citTRE1 = Value End Set End Property Public Property CouCodTRE1() As String Get Return Me._couCodTRE1 End Get Set Me._couCodTRE1 = Value End Set End Property Public Property TRAREPLNG() As String Get Return Me._tRAREPLNG End Get Set Me._tRAREPLNG = Value End Set End Property Public Property TINTRE1() As String Get Return Me._tINTRE1 End Get Set Me._tINTRE1 = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TRAREPType)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize TRAREPType object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New 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) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes TRAREPType object ''' ''' string to deserialize ''' Output TRAREPType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TRAREPType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, TRAREPType) 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 TRAREPType) 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 TRAREPType Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TRAREPType) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As TRAREPType Return CType(SerializerXml.Deserialize(s), TRAREPType) End Function #End Region ''' ''' Serializes current TRAREPType object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an TRAREPType object ''' ''' File to load and deserialize ''' Output TRAREPType object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TRAREPType, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, TRAREPType) 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 TRAREPType) 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 TRAREPType Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Partial Public Class FUNERRER1Type #Region "Private fields" Private _errTypER11 As FunctionalErrorCodes Private _errPoiER12 As String Private _errReaER13 As String Private _oriAttValER14 As String Private Shared _serializerXml As XmlSerializer #End Region Public Property ErrTypER11() As FunctionalErrorCodes Get Return Me._errTypER11 End Get Set Me._errTypER11 = Value End Set End Property Public Property ErrPoiER12() As String Get Return Me._errPoiER12 End Get Set Me._errPoiER12 = Value End Set End Property Public Property ErrReaER13() As String Get Return Me._errReaER13 End Get Set Me._errReaER13 = Value End Set End Property Public Property OriAttValER14() As String Get Return Me._oriAttValER14 End Get Set Me._oriAttValER14 = Value End Set End Property Private Shared ReadOnly Property SerializerXml() As XmlSerializer Get If (_serializerXml Is Nothing) Then _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FUNERRER1Type)) End If Return _serializerXml End Get End Property #Region "Serialize/Deserialize" ''' ''' Serialize FUNERRER1Type object ''' ''' XML value Public Overridable Function Serialize() As String Dim streamReader As StreamReader = Nothing Dim memoryStream As MemoryStream = Nothing Try memoryStream = New 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) SerializerXml.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes FUNERRER1Type object ''' ''' string to deserialize ''' Output FUNERRER1Type object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FUNERRER1Type, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, FUNERRER1Type) 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 FUNERRER1Type) 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 FUNERRER1Type Dim stringReader As StringReader = Nothing Try stringReader = New StringReader(input) Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FUNERRER1Type) Finally If (Not (stringReader) Is Nothing) Then stringReader.Dispose() End If End Try End Function Public Overloads Shared Function Deserialize(ByVal s As Stream) As FUNERRER1Type Return CType(SerializerXml.Deserialize(s), FUNERRER1Type) End Function #End Region ''' ''' Serializes current FUNERRER1Type object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As StreamWriter = Nothing Try Dim dataString As String = Serialize() Dim outputFile As FileInfo = New FileInfo(fileName) streamWriter = outputFile.CreateText streamWriter.WriteLine(dataString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an FUNERRER1Type object ''' ''' File to load and deserialize ''' Output FUNERRER1Type object ''' output Exception value if deserialize failed ''' true if this Serializer can deserialize the object; otherwise, false Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FUNERRER1Type, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, FUNERRER1Type) 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 FUNERRER1Type) 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 FUNERRER1Type Dim file As FileStream = Nothing Dim sr As StreamReader = Nothing Try file = New FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New StreamReader(file) Dim dataString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(dataString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class Public Enum FunctionalErrorCodes Item12 Item13 Item14 Item15 Item19 Item26 Item35 Item37 Item38 Item39 Item40 Item90 Item91 Item92 Item93 End Enum End Namespace #Enable Warning