First Pass of new control loader add BaseClass that provides Logger

This commit is contained in:
Jonathan Jenne
2019-03-22 16:26:15 +01:00
parent 0f4c04dde7
commit 968435c3f7
18 changed files with 379 additions and 94 deletions

View File

@@ -4,8 +4,7 @@ Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference
Public Class ClassService
Private ReadOnly _LogConfig As LogConfig
Private ReadOnly _Logger As Logger
Inherits BaseClass
Public Enum ConnectionTestResult
Successful
@@ -15,8 +14,7 @@ Public Class ClassService
End Enum
Public Sub New(LogConfig As LogConfig)
_LogConfig = LogConfig
_Logger = _LogConfig.GetLogger()
MyBase.New(LogConfig)
End Sub
Public Function TestConnection() As ConnectionTestResult
@@ -33,10 +31,10 @@ Public Class ClassService
Return ConnectionTestResult.Successful
Catch ex As EndpointNotFoundException
_Logger.Error(ex)
Logger.Error(ex)
Return ConnectionTestResult.NotFound
Catch ex As Exception
_Logger.Error(ex)
Logger.Error(ex)
Return ConnectionTestResult.Unknown
End Try
End Function
@@ -56,13 +54,13 @@ Public Class ClassService
Return ConnectionTestResult.Successful
Catch ex As EndpointNotFoundException
_Logger.Error(ex)
Logger.Error(ex)
Return ConnectionTestResult.NotFound
Catch ex As UriFormatException
_Logger.Error(ex)
Logger.Error(ex)
Return ConnectionTestResult.EmptyURI
Catch ex As Exception
_Logger.Error(ex)
Logger.Error(ex)
Return ConnectionTestResult.Unknown
End Try
End Function)