'' ------------------------------------------------------------------------------ '' '' Generated by Xsd2Code++. Version 4.4.0.7 '' EntscheidungAnmeldungListVisualBasicFalseFalseFalseOnlyIfDifferentFalseNet45AllTrueTrueTrueFalseFalseFalseFalseFalseNoneStartWithUnderscoreFalseFalseFalseFalseFalsePublicTrueFalseFalseFalseFalseFalseFalseFalseFalseTrueTrueTrueFalseTrueSerializeDeserializeSaveToFileLoadFromFileFalseTrueIndent2SpaceFalseFalseUTF8XmlSerializerFalseFalseFalseFalseFalseFalseFalseEntityBaseFalseFalse '' '' ------------------------------------------------------------------------------ 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 EntscheidungAnmeldung _ Partial Public Class EntscheidungAnmeldungRLTyp Inherits DatenaustauschFreierVerkehrTyp #Region "Private fields" Private _einzelEntscheidungAnmeldung As EinzelEntscheidungAnmeldungTyp Private Shared sSerializer As XmlSerializer #End Region Public Sub New() MyBase.New() Me._einzelEntscheidungAnmeldung = New EinzelEntscheidungAnmeldungTyp() End Sub _ Public Property EinzelEntscheidungAnmeldung() As EinzelEntscheidungAnmeldungTyp Get Return Me._einzelEntscheidungAnmeldung End Get Set(value As EinzelEntscheidungAnmeldungTyp) Me._einzelEntscheidungAnmeldung = Value End Set End Property Private Shared ReadOnly Property Serializer() As XmlSerializer Get If (sSerializer Is Nothing) Then sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(EntscheidungAnmeldungRLTyp)) End If Return sSerializer End Get End Property #Region "Serialize/Deserialize" ''' ''' Serializes current EntscheidungAnmeldungRLTyp object into an XML string ''' ''' string XML value Public Overridable Function Serialize() As String Dim streamReader As System.IO.StreamReader = Nothing Dim memoryStream As System.IO.MemoryStream = Nothing Try memoryStream = New System.IO.MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings) Serializer.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New System.IO.StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes workflow markup into an EntscheidungAnmeldungRLTyp object ''' ''' string workflow markup to deserialize ''' Output EntscheidungAnmeldungRLTyp 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 EntscheidungAnmeldungRLTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, EntscheidungAnmeldungRLTyp) 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 EntscheidungAnmeldungRLTyp) 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 EntscheidungAnmeldungRLTyp Dim stringReader As System.IO.StringReader = Nothing Try stringReader = New System.IO.StringReader(input) Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), EntscheidungAnmeldungRLTyp) 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 EntscheidungAnmeldungRLTyp Return CType(Serializer.Deserialize(s), EntscheidungAnmeldungRLTyp) End Function #End Region ''' ''' Serializes current EntscheidungAnmeldungRLTyp object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As System.IO.StreamWriter = Nothing Try Dim xmlString As String = Serialize() Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName) streamWriter = xmlFile.CreateText streamWriter.WriteLine(xmlString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an EntscheidungAnmeldungRLTyp object ''' ''' string xml file to load and deserialize ''' Output EntscheidungAnmeldungRLTyp 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 EntscheidungAnmeldungRLTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, EntscheidungAnmeldungRLTyp) 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 EntscheidungAnmeldungRLTyp) 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 EntscheidungAnmeldungRLTyp Dim file As System.IO.FileStream = Nothing Dim sr As System.IO.StreamReader = Nothing Try file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New System.IO.StreamReader(file) Dim xmlString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(xmlString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class _ Partial Public Class EinzelEntscheidungAnmeldungTyp #Region "Private fields" Private _objektIdentifizierung As ObjektIdentifizierungRLTyp Private _kopfDaten As KopfDatenEntscheidungAnmeldungTyp Private _position As List(Of PositionEntscheidungAnmeldungTyp) Private Shared sSerializer As XmlSerializer #End Region Public Sub New() MyBase.New() Me._position = New List(Of PositionEntscheidungAnmeldungTyp)() Me._kopfDaten = New KopfDatenEntscheidungAnmeldungTyp() Me._objektIdentifizierung = New ObjektIdentifizierungRLTyp() End Sub _ Public Property ObjektIdentifizierung() As ObjektIdentifizierungRLTyp Get Return Me._objektIdentifizierung End Get Set(value As ObjektIdentifizierungRLTyp) Me._objektIdentifizierung = Value End Set End Property _ Public Property KopfDaten() As KopfDatenEntscheidungAnmeldungTyp Get Return Me._kopfDaten End Get Set(value As KopfDatenEntscheidungAnmeldungTyp) Me._kopfDaten = Value End Set End Property _ Public Property Position() As List(Of PositionEntscheidungAnmeldungTyp) Get Return Me._position End Get Set(value As List(Of PositionEntscheidungAnmeldungTyp)) Me._position = Value End Set End Property Private Shared ReadOnly Property Serializer() As XmlSerializer Get If (sSerializer Is Nothing) Then sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(EinzelEntscheidungAnmeldungTyp)) End If Return sSerializer End Get End Property #Region "Serialize/Deserialize" ''' ''' Serializes current EinzelEntscheidungAnmeldungTyp object into an XML string ''' ''' string XML value Public Overridable Function Serialize() As String Dim streamReader As System.IO.StreamReader = Nothing Dim memoryStream As System.IO.MemoryStream = Nothing Try memoryStream = New System.IO.MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings) Serializer.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New System.IO.StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes workflow markup into an EinzelEntscheidungAnmeldungTyp object ''' ''' string workflow markup to deserialize ''' Output EinzelEntscheidungAnmeldungTyp 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 EinzelEntscheidungAnmeldungTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, EinzelEntscheidungAnmeldungTyp) 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 EinzelEntscheidungAnmeldungTyp) 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 EinzelEntscheidungAnmeldungTyp Dim stringReader As System.IO.StringReader = Nothing Try stringReader = New System.IO.StringReader(input) Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), EinzelEntscheidungAnmeldungTyp) 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 EinzelEntscheidungAnmeldungTyp Return CType(Serializer.Deserialize(s), EinzelEntscheidungAnmeldungTyp) End Function #End Region ''' ''' Serializes current EinzelEntscheidungAnmeldungTyp object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As System.IO.StreamWriter = Nothing Try Dim xmlString As String = Serialize() Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName) streamWriter = xmlFile.CreateText streamWriter.WriteLine(xmlString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an EinzelEntscheidungAnmeldungTyp object ''' ''' string xml file to load and deserialize ''' Output EinzelEntscheidungAnmeldungTyp 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 EinzelEntscheidungAnmeldungTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, EinzelEntscheidungAnmeldungTyp) 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 EinzelEntscheidungAnmeldungTyp) 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 EinzelEntscheidungAnmeldungTyp Dim file As System.IO.FileStream = Nothing Dim sr As System.IO.StreamReader = Nothing Try file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New System.IO.StreamReader(file) Dim xmlString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(xmlString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class _ Partial Public Class ObjektIdentifizierungRLTyp #Region "Private fields" Private _objektName As String Private _objektAlias As String Private _eDIFACTNachrichtenNr As String Private _zeitpunktEingang As Date Private _shipmentReferenz As String Private Shared sSerializer As XmlSerializer #End Region _ Public Property ObjektName() As String Get Return Me._objektName End Get Set(value As String) Me._objektName = Value End Set End Property _ Public Property ObjektAlias() As String Get Return Me._objektAlias End Get Set(value As String) Me._objektAlias = Value End Set End Property _ Public Property EDIFACTNachrichtenNr() As String Get Return Me._eDIFACTNachrichtenNr End Get Set(value As String) Me._eDIFACTNachrichtenNr = Value End Set End Property _ Public Property ZeitpunktEingang() As Date Get Return Me._zeitpunktEingang End Get Set(value As Date) Me._zeitpunktEingang = Value End Set End Property _ Public Property ShipmentReferenz() As String Get Return Me._shipmentReferenz End Get Set(value As String) Me._shipmentReferenz = Value End Set End Property Private Shared ReadOnly Property Serializer() As XmlSerializer Get If (sSerializer Is Nothing) Then sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungRLTyp)) End If Return sSerializer End Get End Property #Region "Serialize/Deserialize" ''' ''' Serializes current ObjektIdentifizierungRLTyp object into an XML string ''' ''' string XML value Public Overridable Function Serialize() As String Dim streamReader As System.IO.StreamReader = Nothing Dim memoryStream As System.IO.MemoryStream = Nothing Try memoryStream = New System.IO.MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings) Serializer.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New System.IO.StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes workflow markup into an ObjektIdentifizierungRLTyp object ''' ''' string workflow markup to deserialize ''' Output ObjektIdentifizierungRLTyp 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 ObjektIdentifizierungRLTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, ObjektIdentifizierungRLTyp) 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 ObjektIdentifizierungRLTyp) 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 ObjektIdentifizierungRLTyp Dim stringReader As System.IO.StringReader = Nothing Try stringReader = New System.IO.StringReader(input) Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungRLTyp) 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 ObjektIdentifizierungRLTyp Return CType(Serializer.Deserialize(s), ObjektIdentifizierungRLTyp) End Function #End Region ''' ''' Serializes current ObjektIdentifizierungRLTyp object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As System.IO.StreamWriter = Nothing Try Dim xmlString As String = Serialize() Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName) streamWriter = xmlFile.CreateText streamWriter.WriteLine(xmlString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an ObjektIdentifizierungRLTyp object ''' ''' string xml file to load and deserialize ''' Output ObjektIdentifizierungRLTyp 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 ObjektIdentifizierungRLTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, ObjektIdentifizierungRLTyp) 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 ObjektIdentifizierungRLTyp) 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 ObjektIdentifizierungRLTyp Dim file As System.IO.FileStream = Nothing Dim sr As System.IO.StreamReader = Nothing Try file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New System.IO.StreamReader(file) Dim xmlString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(xmlString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class _ Partial Public Class PositionEntscheidungAnmeldungTyp #Region "Private fields" Private _positionsnummer As String Private _annahmeKz As String Private _annahmeDatum As Date Private _ueberlassungKz As String Private _ueberlassungDatum As Date Private _ueberlassungUhrzeit As Date Private _mitteilungTeilnehmerBeschau As String Private _rueckgabeKz As String Private _anordnungKz As String Private Shared sSerializer As XmlSerializer #End Region _ Public Property Positionsnummer() As String Get Return Me._positionsnummer End Get Set(value As String) Me._positionsnummer = Value End Set End Property _ Public Property AnnahmeKz() As String Get Return Me._annahmeKz End Get Set(value As String) Me._annahmeKz = Value End Set End Property _ Public Property AnnahmeDatum() As Date Get Return Me._annahmeDatum End Get Set(value As Date) Me._annahmeDatum = Value End Set End Property _ Public Property UeberlassungKz() As String Get Return Me._ueberlassungKz End Get Set(value As String) Me._ueberlassungKz = Value End Set End Property _ Public Property UeberlassungDatum() As Date Get Return Me._ueberlassungDatum End Get Set(value As Date) Me._ueberlassungDatum = Value End Set End Property _ Public Property UeberlassungUhrzeit() As Date Get Return Me._ueberlassungUhrzeit End Get Set(value As Date) Me._ueberlassungUhrzeit = Value End Set End Property _ Public Property MitteilungTeilnehmerBeschau() As String Get Return Me._mitteilungTeilnehmerBeschau End Get Set(value As String) Me._mitteilungTeilnehmerBeschau = Value End Set End Property _ Public Property RueckgabeKz() As String Get Return Me._rueckgabeKz End Get Set(value As String) Me._rueckgabeKz = Value End Set End Property _ Public Property AnordnungKz() As String Get Return Me._anordnungKz End Get Set(value As String) Me._anordnungKz = Value End Set End Property Private Shared ReadOnly Property Serializer() As XmlSerializer Get If (sSerializer Is Nothing) Then sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(PositionEntscheidungAnmeldungTyp)) End If Return sSerializer End Get End Property #Region "Serialize/Deserialize" ''' ''' Serializes current PositionEntscheidungAnmeldungTyp object into an XML string ''' ''' string XML value Public Overridable Function Serialize() As String Dim streamReader As System.IO.StreamReader = Nothing Dim memoryStream As System.IO.MemoryStream = Nothing Try memoryStream = New System.IO.MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings) Serializer.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New System.IO.StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes workflow markup into an PositionEntscheidungAnmeldungTyp object ''' ''' string workflow markup to deserialize ''' Output PositionEntscheidungAnmeldungTyp 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 PositionEntscheidungAnmeldungTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, PositionEntscheidungAnmeldungTyp) 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 PositionEntscheidungAnmeldungTyp) 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 PositionEntscheidungAnmeldungTyp Dim stringReader As System.IO.StringReader = Nothing Try stringReader = New System.IO.StringReader(input) Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), PositionEntscheidungAnmeldungTyp) 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 PositionEntscheidungAnmeldungTyp Return CType(Serializer.Deserialize(s), PositionEntscheidungAnmeldungTyp) End Function #End Region ''' ''' Serializes current PositionEntscheidungAnmeldungTyp object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As System.IO.StreamWriter = Nothing Try Dim xmlString As String = Serialize() Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName) streamWriter = xmlFile.CreateText streamWriter.WriteLine(xmlString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an PositionEntscheidungAnmeldungTyp object ''' ''' string xml file to load and deserialize ''' Output PositionEntscheidungAnmeldungTyp 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 PositionEntscheidungAnmeldungTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, PositionEntscheidungAnmeldungTyp) 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 PositionEntscheidungAnmeldungTyp) 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 PositionEntscheidungAnmeldungTyp Dim file As System.IO.FileStream = Nothing Dim sr As System.IO.StreamReader = Nothing Try file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New System.IO.StreamReader(file) Dim xmlString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(xmlString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class _ Partial Public Class KopfDatenEntscheidungAnmeldungTyp #Region "Private fields" Private _registriernummer As String Private _mitteilungTeilnehmerGestellungsmodalitaeten As String Private _bearbeiterZoll As String Private _arbeitsnummerVorzeitigeAnmeldung As String Private _containernummer As List(Of String) Private Shared sSerializer As XmlSerializer #End Region Public Sub New() MyBase.New() Me._containernummer = New List(Of String)() End Sub _ Public Property Registriernummer() As String Get Return Me._registriernummer End Get Set(value As String) Me._registriernummer = Value End Set End Property _ Public Property MitteilungTeilnehmerGestellungsmodalitaeten() As String Get Return Me._mitteilungTeilnehmerGestellungsmodalitaeten End Get Set(value As String) Me._mitteilungTeilnehmerGestellungsmodalitaeten = Value End Set End Property _ Public Property BearbeiterZoll() As String Get Return Me._bearbeiterZoll End Get Set(value As String) Me._bearbeiterZoll = Value End Set End Property _ Public Property ArbeitsnummerVorzeitigeAnmeldung() As String Get Return Me._arbeitsnummerVorzeitigeAnmeldung End Get Set(value As String) Me._arbeitsnummerVorzeitigeAnmeldung = Value End Set End Property _ Public Property Containernummer() As List(Of String) Get Return Me._containernummer End Get Set(value As List(Of String)) Me._containernummer = Value End Set End Property Private Shared ReadOnly Property Serializer() As XmlSerializer Get If (sSerializer Is Nothing) Then sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenEntscheidungAnmeldungTyp)) End If Return sSerializer End Get End Property #Region "Serialize/Deserialize" ''' ''' Serializes current KopfDatenEntscheidungAnmeldungTyp object into an XML string ''' ''' string XML value Public Overridable Function Serialize() As String Dim streamReader As System.IO.StreamReader = Nothing Dim memoryStream As System.IO.MemoryStream = Nothing Try memoryStream = New System.IO.MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings) Serializer.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New System.IO.StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes workflow markup into an KopfDatenEntscheidungAnmeldungTyp object ''' ''' string workflow markup to deserialize ''' Output KopfDatenEntscheidungAnmeldungTyp 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 KopfDatenEntscheidungAnmeldungTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, KopfDatenEntscheidungAnmeldungTyp) 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 KopfDatenEntscheidungAnmeldungTyp) 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 KopfDatenEntscheidungAnmeldungTyp Dim stringReader As System.IO.StringReader = Nothing Try stringReader = New System.IO.StringReader(input) Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), KopfDatenEntscheidungAnmeldungTyp) 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 KopfDatenEntscheidungAnmeldungTyp Return CType(Serializer.Deserialize(s), KopfDatenEntscheidungAnmeldungTyp) End Function #End Region ''' ''' Serializes current KopfDatenEntscheidungAnmeldungTyp object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As System.IO.StreamWriter = Nothing Try Dim xmlString As String = Serialize() Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName) streamWriter = xmlFile.CreateText streamWriter.WriteLine(xmlString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an KopfDatenEntscheidungAnmeldungTyp object ''' ''' string xml file to load and deserialize ''' Output KopfDatenEntscheidungAnmeldungTyp 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 KopfDatenEntscheidungAnmeldungTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, KopfDatenEntscheidungAnmeldungTyp) 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 KopfDatenEntscheidungAnmeldungTyp) 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 KopfDatenEntscheidungAnmeldungTyp Dim file As System.IO.FileStream = Nothing Dim sr As System.IO.StreamReader = Nothing Try file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New System.IO.StreamReader(file) Dim xmlString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(xmlString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class _ Partial Public Class TransaktionFreierVerkehrTyp #Region "Private fields" Private _iOPartner As String Private _iODivision1 As String Private _iODivision2 As String Private _iODivision3 As String Private _iOReferenz As String Private _iODatumZeit As Date Private _version As String Private Shared sSerializer As XmlSerializer #End Region _ Public Property IOPartner() As String Get Return Me._iOPartner End Get Set(value As String) Me._iOPartner = Value End Set End Property _ Public Property IODivision1() As String Get Return Me._iODivision1 End Get Set(value As String) Me._iODivision1 = Value End Set End Property _ Public Property IODivision2() As String Get Return Me._iODivision2 End Get Set(value As String) Me._iODivision2 = Value End Set End Property _ Public Property IODivision3() As String Get Return Me._iODivision3 End Get Set(value As String) Me._iODivision3 = Value End Set End Property _ Public Property IOReferenz() As String Get Return Me._iOReferenz End Get Set(value As String) Me._iOReferenz = Value End Set End Property _ Public Property IODatumZeit() As Date Get Return Me._iODatumZeit End Get Set(value As Date) Me._iODatumZeit = Value End Set End Property _ Public Property Version() As String Get Return Me._version End Get Set(value As String) Me._version = Value End Set End Property Private Shared ReadOnly Property Serializer() As XmlSerializer Get If (sSerializer Is Nothing) Then sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionFreierVerkehrTyp)) End If Return sSerializer End Get End Property #Region "Serialize/Deserialize" ''' ''' Serializes current TransaktionFreierVerkehrTyp object into an XML string ''' ''' string XML value Public Overridable Function Serialize() As String Dim streamReader As System.IO.StreamReader = Nothing Dim memoryStream As System.IO.MemoryStream = Nothing Try memoryStream = New System.IO.MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings) Serializer.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New System.IO.StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes workflow markup into an TransaktionFreierVerkehrTyp object ''' ''' string workflow markup to deserialize ''' Output TransaktionFreierVerkehrTyp 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 TransaktionFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, TransaktionFreierVerkehrTyp) 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 TransaktionFreierVerkehrTyp) 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 TransaktionFreierVerkehrTyp Dim stringReader As System.IO.StringReader = Nothing Try stringReader = New System.IO.StringReader(input) Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), TransaktionFreierVerkehrTyp) 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 TransaktionFreierVerkehrTyp Return CType(Serializer.Deserialize(s), TransaktionFreierVerkehrTyp) End Function #End Region ''' ''' Serializes current TransaktionFreierVerkehrTyp object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As System.IO.StreamWriter = Nothing Try Dim xmlString As String = Serialize() Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName) streamWriter = xmlFile.CreateText streamWriter.WriteLine(xmlString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an TransaktionFreierVerkehrTyp object ''' ''' string xml file to load and deserialize ''' Output TransaktionFreierVerkehrTyp 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 TransaktionFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, TransaktionFreierVerkehrTyp) 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 TransaktionFreierVerkehrTyp) 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 TransaktionFreierVerkehrTyp Dim file As System.IO.FileStream = Nothing Dim sr As System.IO.StreamReader = Nothing Try file = New System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read) sr = New System.IO.StreamReader(file) Dim xmlString As String = sr.ReadToEnd sr.Close() file.Close() Return Deserialize(xmlString) Finally If (Not (file) Is Nothing) Then file.Dispose() End If If (Not (sr) Is Nothing) Then sr.Dispose() End If End Try End Function End Class _ Partial Public Class DatenaustauschFreierVerkehrTyp #Region "Private fields" Private _transaktion As TransaktionFreierVerkehrTyp Private Shared sSerializer As XmlSerializer #End Region Public Sub New() MyBase.New() Me._transaktion = New TransaktionFreierVerkehrTyp() End Sub _ Public Property Transaktion() As TransaktionFreierVerkehrTyp Get Return Me._transaktion End Get Set(value As TransaktionFreierVerkehrTyp) Me._transaktion = Value End Set End Property Private Shared ReadOnly Property Serializer() As XmlSerializer Get If (sSerializer Is Nothing) Then sSerializer = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschFreierVerkehrTyp)) End If Return sSerializer End Get End Property #Region "Serialize/Deserialize" ''' ''' Serializes current DatenaustauschFreierVerkehrTyp object into an XML string ''' ''' string XML value Public Overridable Function Serialize() As String Dim streamReader As System.IO.StreamReader = Nothing Dim memoryStream As System.IO.MemoryStream = Nothing Try memoryStream = New System.IO.MemoryStream() Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() xmlWriterSettings.Indent = True xmlWriterSettings.IndentChars = " " Dim xmlWriter As System.Xml.XmlWriter = xmlWriter.Create(memoryStream, xmlWriterSettings) Serializer.Serialize(xmlWriter, Me) memoryStream.Seek(0, SeekOrigin.Begin) streamReader = New System.IO.StreamReader(memoryStream) Return streamReader.ReadToEnd Finally If (Not (streamReader) Is Nothing) Then streamReader.Dispose() End If If (Not (memoryStream) Is Nothing) Then memoryStream.Dispose() End If End Try End Function ''' ''' Deserializes workflow markup into an DatenaustauschFreierVerkehrTyp object ''' ''' string workflow markup to deserialize ''' Output DatenaustauschFreierVerkehrTyp 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 DatenaustauschFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DatenaustauschFreierVerkehrTyp) 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 DatenaustauschFreierVerkehrTyp) 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 DatenaustauschFreierVerkehrTyp Dim stringReader As System.IO.StringReader = Nothing Try stringReader = New System.IO.StringReader(input) Return CType(Serializer.Deserialize(XmlReader.Create(stringReader)), DatenaustauschFreierVerkehrTyp) 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 DatenaustauschFreierVerkehrTyp Return CType(Serializer.Deserialize(s), DatenaustauschFreierVerkehrTyp) End Function #End Region ''' ''' Serializes current DatenaustauschFreierVerkehrTyp object into file ''' ''' full path of outupt xml file ''' output Exception value if failed ''' true if can serialize and save into file; otherwise, false Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean exception = Nothing Try SaveToFile(fileName) Return True Catch e As System.Exception exception = e Return False End Try End Function Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) Dim streamWriter As System.IO.StreamWriter = Nothing Try Dim xmlString As String = Serialize() Dim xmlFile As System.IO.FileInfo = New System.IO.FileInfo(fileName) streamWriter = xmlFile.CreateText streamWriter.WriteLine(xmlString) streamWriter.Close() Finally If (Not (streamWriter) Is Nothing) Then streamWriter.Dispose() End If End Try End Sub ''' ''' Deserializes xml markup from file into an DatenaustauschFreierVerkehrTyp object ''' ''' string xml file to load and deserialize ''' Output DatenaustauschFreierVerkehrTyp 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 DatenaustauschFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean exception = Nothing obj = CType(Nothing, DatenaustauschFreierVerkehrTyp) 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 DatenaustauschFreierVerkehrTyp) 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 DatenaustauschFreierVerkehrTyp 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