22Public Class Contact
33 Inherits AddressableBase
44
5+ Public Sub New ()
6+ MyBase .New( "" , 0 , IPVersion.None, AddressableType.None)
7+ End Sub
8+
59 Public Sub New (other As AddressableBase)
610 MyBase .New(other)
711 End Sub
812
913 Public Sub New (targAddress As String , targPort As Integer , targVer As IPVersion, aType As AddressableType)
1014 MyBase .New(targAddress, targPort, targVer, aType)
1115 End Sub
12-
16+ <Xml.Serialization.XmlElement(ElementName:= "targetAddress" )>
1317 Public Overloads Property targetAddress As String
1418 Get
1519 Return MyBase .targetAddress
@@ -18,7 +22,7 @@ Public Class Contact
1822 MyBase .targetAddress = value
1923 End Set
2024 End Property
21-
25+ <Xml.Serialization.XmlElement(ElementName:= "targetPort" )>
2226 Public Overloads Property targetPort As Integer
2327 Get
2428 Return MyBase .targetPort
@@ -27,7 +31,7 @@ Public Class Contact
2731 MyBase .targetPort = value
2832 End Set
2933 End Property
30-
34+ <Xml.Serialization.XmlElement(ElementName:= "type" )>
3135 Public Overloads Property type As AddressableType
3236 Get
3337 Return MyBase .type
@@ -36,7 +40,7 @@ Public Class Contact
3640 MyBase .type = value
3741 End Set
3842 End Property
39-
43+ <Xml.Serialization.XmlElement(ElementName:= "targetIPVersion" )>
4044 Public Overloads Property targetIPVersion As IPVersion
4145 Get
4246 Return MyBase .targetIPVersion
@@ -67,12 +71,17 @@ Public Class Contact
6771 Public Overrides Function duplicateToNew() As AddressableBase
6872 Return New Contact( Me )
6973 End Function
74+ End Class
75+
76+ <Serializable, Xml.Serialization.XmlInclude( GetType (Contact))>
77+ Public Class Contacts
78+ Public contacts As Contact() = New Contact() {}
7079
71- Public Shared Function load(strIn As String ) As Contact
72- Return sserializer.deSerialize( Of Contact )(strIn)
80+ Public Shared Function load(strIn As String ) As Contacts
81+ Return sserializer.deSerialize( Of Contacts )(strIn)
7382 End Function
7483
7584 Public Function save() As String
76- Return sserializer.serialize( Of Contact )(Me )
85+ Return sserializer.serialize( Of Contacts )(Me )
7786 End Function
7887End Class
0 commit comments