Projektdateien hinzufügen.

This commit is contained in:
Jonathan Jenne
2022-12-01 16:37:39 +01:00
parent 622c632b65
commit c867e4e3a6
101 changed files with 5117 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
Imports System.ServiceModel
Imports System.ServiceModel.Description
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Messaging.WCF
Imports ECM.JobRunner.Common
Namespace WCF
Public Class JobRunner
Implements IJobRunner
Public Shared State As State
Public Shared LogConfig As LogConfig
Public Shared Database As MSSQLServer
''' <summary>
''' See: https://stackoverflow.com/questions/42327988/addserviceendpoint-throws-key-is-null
''' </summary>
''' <param name="Config"></param>
Public Shared Sub Configure(Config As ServiceConfiguration)
Dim oBaseAddress = Config.BaseAddresses.Item(0)
Dim oBinding = Binding.GetBinding()
Dim oAddress = New EndpointAddress(oBaseAddress)
Dim oDescription = ContractDescription.GetContract(GetType(IJobRunner), GetType(JobRunner))
Dim oEndpoint As New ServiceEndpoint(oDescription, oBinding, oAddress)
Config.AddServiceEndpoint(oEndpoint)
Config.Description.Behaviors.Add(New ServiceDebugBehavior With {
.IncludeExceptionDetailInFaults = True
})
End Sub
Public Function GetHeartbeat() As Date Implements IJobRunner.GetHeartbeat
Return Now
End Function
Public Function GetJobHistory() As GetJobHistory.GetJobHistoryResponse Implements IJobRunner.GetJobHistory
Dim oMethod As New GetJobHistory.GetJobHistoryMethod(LogConfig, Database, State)
Return oMethod.Run()
End Function
Public Function GetJobConfig() As GetJobConfig.GetJobConfigResponse Implements IJobRunner.GetJobConfig
Dim oMethod As New GetJobConfig.GetJobConfigMethod(LogConfig, Database, State)
Return oMethod.Run()
End Function
End Class
End Namespace