/
WebApplication.vb
45 lines (40 loc) · 2.15 KB
/
WebApplication.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
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Xpo
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports DevExpress.ExpressApp.Web
Namespace HowToImplementSingleton.Web
Partial Public Class HowToImplementSingletonAspNetApplication
Inherits WebApplication
Protected Overrides Sub CreateDefaultObjectSpaceProvider(ByVal args As CreateCustomObjectSpaceProviderEventArgs)
args.ObjectSpaceProvider = New XPObjectSpaceProvider(args.ConnectionString, args.Connection, True)
End Sub
Private module1 As DevExpress.ExpressApp.SystemModule.SystemModule
Private module2 As DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule
Private howToImplementSingletonModule1 As HowToImplementSingleton.Module.HowToImplementSingletonModule
Private module3 As HowToImplementSingleton.Module.HowToImplementSingletonModule
Public Sub New()
InitializeComponent()
End Sub
Private Sub HowToImplementSingletonAspNetApplication_DatabaseVersionMismatch(ByVal sender As Object, ByVal e As DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs) Handles MyBase.DatabaseVersionMismatch
e.Updater.Update()
e.Handled = True
End Sub
Private Sub InitializeComponent()
Me.module1 = New DevExpress.ExpressApp.SystemModule.SystemModule()
Me.module2 = New DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule()
Me.module3 = New HowToImplementSingleton.Module.HowToImplementSingletonModule()
Me.howToImplementSingletonModule1 = New HowToImplementSingleton.Module.HowToImplementSingletonModule()
DirectCast(Me, System.ComponentModel.ISupportInitialize).BeginInit()
'
' HowToImplementSingletonAspNetApplication
'
Me.ApplicationName = "HowToImplementSingleton"
Me.Modules.Add(Me.module1)
Me.Modules.Add(Me.module2)
Me.Modules.Add(Me.howToImplementSingletonModule1)
DirectCast(Me, System.ComponentModel.ISupportInitialize).EndInit()
End Sub
End Class
End Namespace