/
ObjectClass.vb
59 lines (56 loc) · 1.68 KB
/
ObjectClass.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
Imports System
Imports DevExpress.Xpo
Namespace SimpleObject
Public Class Parent
Inherits XPObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Private _Name As String
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
SetPropertyValue("Name", _Name, value)
End Set
End Property
<Association("ParentChildren"), Aggregated> _
Public ReadOnly Property Children() As XPCollection(Of Child)
Get
Return GetCollection(Of Child)("Children")
End Get
End Property
End Class
Public Class Child
Inherits XPObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Private _Name As String
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
SetPropertyValue("Name", _Name, value)
End Set
End Property
Private _Parent As Parent
<Association("ParentChildren")> _
Public Property Parent() As Parent
Get
Return _Parent
End Get
Set(ByVal value As Parent)
SetPropertyValue("Parent", _Parent, value)
End Set
End Property
End Class
End Namespace