29 lines
909 B
VB.net
29 lines
909 B
VB.net
Imports DigitalData.Modules.Database
|
|
Imports DigitalData.Modules.Logging
|
|
Imports DigitalData.Services.EDMIService.IDB
|
|
|
|
Public MustInherit Class BaseMethod
|
|
Inherits BaseClass
|
|
|
|
Friend ReadOnly Database As MSSQLServer
|
|
Friend ReadOnly Helpers As Helpers
|
|
Friend ReadOnly GlobalState As GlobalState
|
|
|
|
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pGlobalState As GlobalState)
|
|
MyBase.New(pLogConfig)
|
|
Database = pMSSQLServer
|
|
Helpers = New Helpers(pLogConfig, pMSSQLServer)
|
|
GlobalState = pGlobalState
|
|
End Sub
|
|
|
|
Public Sub LogAndThrow(pMessage As String)
|
|
Logger.Warn(pMessage)
|
|
Throw New ApplicationException(pMessage)
|
|
End Sub
|
|
|
|
Public Sub LogAndThrow(pException As Exception, pMessage As String)
|
|
Logger.Error(pException)
|
|
Throw New ApplicationException(pMessage, pException)
|
|
End Sub
|
|
End Class
|