EDMIService: Use EDMI.File functions, add DatastorePath
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Imports System.ServiceProcess
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules
|
||||
|
||||
Public Class WindowsService
|
||||
Inherits ServiceBase
|
||||
@@ -14,6 +15,8 @@ Public Class WindowsService
|
||||
Private _db As Firebird
|
||||
Private _clientsConnected As Integer = 0
|
||||
Private _config As AppConfig
|
||||
Private _Path As EDMI.File.Path
|
||||
Private _Archive As EDMI.File.Archive
|
||||
|
||||
Public Sub New()
|
||||
ServiceName = SERVICE_NAME
|
||||
@@ -27,8 +30,9 @@ Public Class WindowsService
|
||||
Try
|
||||
AppConfig.Load()
|
||||
|
||||
_logConfig = New LogConfig(LogConfig.PathType.CustomPath, "E:\EDMService")
|
||||
_logConfig.Debug = True
|
||||
_logConfig = New LogConfig(LogConfig.PathType.CustomPath, "E:\EDMService") With {
|
||||
.Debug = True
|
||||
}
|
||||
|
||||
_logger = _logConfig.GetLogger()
|
||||
|
||||
@@ -45,9 +49,18 @@ Public Class WindowsService
|
||||
|
||||
_logger.Info("Database connection established.")
|
||||
|
||||
_logger.Debug("Initializing EDMI Functions")
|
||||
|
||||
_Path = New EDMI.File.Path(_logConfig, AppConfig.DatastorePath)
|
||||
_Archive = New EDMI.File.Archive(_logConfig)
|
||||
|
||||
_logger.Debug("EDMI Functions initialized.")
|
||||
|
||||
EDMIService.Database = _db
|
||||
EDMIService.LogConfig = _logConfig
|
||||
EDMIService.AppConfig = _config
|
||||
EDMIService.EDMIArchive = _Archive
|
||||
EDMIService.EDMIPath = _Path
|
||||
|
||||
_logger.Debug("Starting WCF ServiceHost...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user