-
Notifications
You must be signed in to change notification settings - Fork 0
/
UpnpServiceAttributes.vb
81 lines (69 loc) · 2.54 KB
/
UpnpServiceAttributes.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Partial Public Class Plugin
<AttributeUsage(AttributeTargets.[Class], AllowMultiple:=True)> _
Private NotInheritable Class UpnpServiceVariable
Inherits Attribute
Private ReadOnly m_name As String
Private ReadOnly m_dataType As String
Private ReadOnly m_sendEvents As Boolean
Private ReadOnly m_allowedValue As String()
Public Sub New(name As String, dataType As String, sendEvents As Boolean, ParamArray allowedValue As String())
m_name = name
m_dataType = dataType
m_sendEvents = sendEvents
m_allowedValue = allowedValue
End Sub
Public Sub New(name As String, dataType As String, sendEvents As Boolean)
Me.New(name, dataType, sendEvents, New String(-1) {})
End Sub
Public ReadOnly Property Name() As String
Get
Return m_name
End Get
End Property
Public ReadOnly Property DataType() As String
Get
Return m_dataType
End Get
End Property
Public ReadOnly Property SendEvents() As Boolean
Get
Return m_sendEvents
End Get
End Property
Public ReadOnly Property AllowedValue() As String()
Get
Return m_allowedValue
End Get
End Property
End Class ' UpnpServiceVariable
<AttributeUsage(AttributeTargets.Parameter Or AttributeTargets.Method, AllowMultiple:=True)> _
Private NotInheritable Class UpnpServiceArgument
Inherits Attribute
Private ReadOnly m_index As Integer
Private ReadOnly m_name As String
Private ReadOnly m_relatedStateVariable As String
Public Sub New(index As Integer, name As String, relatedStateVariable As String)
m_index = index
m_name = name
m_relatedStateVariable = relatedStateVariable
End Sub
Public Sub New(relatedStateVariable As String)
m_relatedStateVariable = relatedStateVariable
End Sub
Public ReadOnly Property Index() As Integer
Get
Return m_index
End Get
End Property
Public ReadOnly Property Name() As String
Get
Return m_name
End Get
End Property
Public ReadOnly Property RelatedStateVariable() As String
Get
Return m_relatedStateVariable
End Get
End Property
End Class ' UpnpServiceArgument
End Class