47 lines
1.3 KiB
VB.net
47 lines
1.3 KiB
VB.net
Imports System.Xml.Serialization
|
|
|
|
<XmlRoot("DeviceObjects")>
|
|
Public Class DeviceObjectClasses
|
|
|
|
<XmlElement("DeviceClass")>
|
|
Public DeviceClass As List(Of DeviceObjectType)
|
|
|
|
|
|
Sub New()
|
|
DeviceClass = New List(Of DeviceObjectType)
|
|
|
|
End Sub
|
|
|
|
Public Function FindDeviceClass(name As String) As DeviceObjectType
|
|
For Each device As DeviceObjectType In DeviceClass
|
|
If String.Compare(name, device.Name, True) = 0 Then Return device
|
|
Next
|
|
Return Nothing
|
|
End Function
|
|
End Class
|
|
|
|
|
|
Public Class DeviceObjectType
|
|
<XmlAttribute("Name")>
|
|
Public Property Name As String
|
|
|
|
<XmlAttribute("Desc")>
|
|
Public Property Desc As String
|
|
|
|
<XmlArray("Attributes"), XmlArrayItem("Attribute", GetType(DeviceChildNodeAttribute))>
|
|
Public Attributes As List(Of DeviceChildNodeAttribute)
|
|
|
|
<XmlArray("Events"), XmlArrayItem("Event", GetType(DeviceChildNodeEvent))>
|
|
Public Events As List(Of DeviceChildNodeEvent)
|
|
|
|
<XmlArray("Methods"), XmlArrayItem("Method", GetType(DeviceChildNodeMethod))>
|
|
Public Methods As List(Of DeviceChildNodeMethod)
|
|
|
|
Sub New()
|
|
Attributes = New List(Of DeviceChildNodeAttribute)
|
|
|
|
Events = New List(Of DeviceChildNodeEvent)
|
|
|
|
Methods = New List(Of DeviceChildNodeMethod)
|
|
End Sub
|
|
End Class |