-
Notifications
You must be signed in to change notification settings - Fork 3
/
Singleton.vb
40 lines (34 loc) · 1.33 KB
/
Singleton.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
Imports System
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports DevExpress.ExpressApp.Xpo
Namespace HowToImplementSingleton.Module
<RuleObjectExists("AnotherSingletonExists", DefaultContexts.Save, "True", InvertResult := True, CustomMessageTemplate := "Another Singleton already exists."), RuleCriteria("CannotDeleteSingleton", DefaultContexts.Delete, "False", CustomMessageTemplate := "Cannot delete Singleton.")> _
Public Class Singleton
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Private name_Renamed As String
Public Property Name() As String
Get
Return name_Renamed
End Get
Set(ByVal value As String)
SetPropertyValue("Name", name_Renamed, value)
End Set
End Property
Private description_Renamed As String
Public Property Description() As String
Get
Return description_Renamed
End Get
Set(ByVal value As String)
SetPropertyValue("Description", description_Renamed, value)
End Set
End Property
End Class
End Namespace