jj: ZUGFeRD

This commit is contained in:
Jonathan Jenne
2018-12-12 16:31:45 +01:00
parent 15124113f7
commit b9f5b56455
41 changed files with 1984 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
Imports System.IO
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Public Class ZUGFeRDService
Private _logConfig As LogConfig
Private _logger As Logger
Private _firebird As Firebird
Private _threadRunner As ThreadRunner
Protected Overrides Sub OnStart(ByVal args() As String)
_logConfig = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"))
_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 directories As New List(Of String) From {"E:\ZUGFeRD_Import"}
_firebird = New Firebird(_logConfig, oDataSource, oDatabase, oUser, oPassword)
_threadRunner = New ThreadRunner(_logConfig, directories)
_threadRunner.Start()
End Sub
Protected Overrides Sub OnStop()
_logger.Info($"{My.Settings.SERVICE_NAME} is stopping.")
_threadRunner.Stop()
End Sub
End Class