jj firebird

This commit is contained in:
Jonathan Jenne
2018-12-18 13:22:32 +01:00
parent 71fdc188c2
commit d33624c66c
16 changed files with 355 additions and 87 deletions

View File

@@ -11,19 +11,26 @@ Public Class ZUGFeRDService
Protected Overrides Sub OnStart(ByVal args() As String)
_logConfig = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"))
_logConfig.Debug = True
_logger = _logConfig.GetLogger()
_logger.Info($"{My.Settings.SERVICE_NAME} is starting.")
Dim oDataSource As String = ""
Dim oDatabase As String = ""
Dim oUser As String = ""
Dim oPassword As String = ""
Dim watchDirectories As New List(Of String) From {"E:\ZUGFeRD_Import"}
Dim oDataSource As String = My.Settings.DB_DATASOURCE
Dim oDatabase As String = My.Settings.DB_DATABASE
Dim oUser As String = My.Settings.DB_USER
Dim oPassword As String = My.Settings.DB_PASSWORD
_logger.Debug("Datasource: {0}", oDataSource)
_logger.Debug("Database: {0}", oDatabase)
_firebird = New Firebird(_logConfig, oDataSource, oDatabase, oUser, oPassword)
_threadRunner = New ThreadRunner(_logConfig, watchDirectories)
_threadRunner.Start()
Try
_threadRunner = New ThreadRunner(_logConfig, _firebird)
_threadRunner.Start()
Catch ex As Exception
_logger.Error(ex)
End Try
End Sub
Protected Overrides Sub OnStop()