From a40af2f977e17def806639602ddc2b2288d8ce41 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Tue, 7 Jul 2026 16:53:51 +0200 Subject: [PATCH] Refaktorierung: DEX_API durch APISQL ersetzt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Datei `DEX_API.vb` wurde entfernt, einschließlich der Klasse `DEX_API`, die von `JobBase` geerbt und das Interface `IJob(Of ADSyncArgs)` implementiert hat. Ein neuer Job-Typ `API_SQL` wurde zur Enumeration `JobType` in `JobConfig.vb` hinzugefügt. Neue Dateien wurden hinzugefügt: - `APISQLArgs.vb`: Enthält die Klasse `APISQLArgs` mit der Eigenschaft `ProfileID`. - `APISQLConfig.vb`: Enthält die Klasse `APISQLConfig` mit den Eigenschaften `BaseUrl`, `Property1`, `Property2`, `Property3`. - `DEX_APIJob.vb`: Enthält die Klasse `DEX_APIJob`, die von `JobBase` erbt und das Interface `IJob(Of APISQLArgs)` implementiert. Die Methoden `StartDex_API` und `ShouldStart` wurden hierhin verschoben und angepasst. Die Projektdatei `Jobs.vbproj` wurde aktualisiert, um die neuen Dateien einzubinden und den Verweis auf `DEX_API.vb` zu entfernen. --- Jobs/DEX_API/APISQLArgs.vb | 4 ++++ Jobs/DEX_API/APISQLConfig.vb | 6 ++++++ Jobs/DEX_API/{DEX_API.vb => DEX_APIJob.vb} | 8 ++++---- Jobs/JobConfig.vb | 1 + Jobs/Jobs.vbproj | 4 +++- 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 Jobs/DEX_API/APISQLArgs.vb create mode 100644 Jobs/DEX_API/APISQLConfig.vb rename Jobs/DEX_API/{DEX_API.vb => DEX_APIJob.vb} (73%) diff --git a/Jobs/DEX_API/APISQLArgs.vb b/Jobs/DEX_API/APISQLArgs.vb new file mode 100644 index 00000000..56ca3c8f --- /dev/null +++ b/Jobs/DEX_API/APISQLArgs.vb @@ -0,0 +1,4 @@ +Public Class APISQLArgs + Inherits JobArgs + Public ProfileID As String +End Class diff --git a/Jobs/DEX_API/APISQLConfig.vb b/Jobs/DEX_API/APISQLConfig.vb new file mode 100644 index 00000000..faf5bc1f --- /dev/null +++ b/Jobs/DEX_API/APISQLConfig.vb @@ -0,0 +1,6 @@ +Public Class APISQLConfig + Public Property BaseUrl As String = "" + Public Property Property1 As String = "" + Public Property Property2 As String = "" + Public Property Property3 As String = "" +End Class diff --git a/Jobs/DEX_API/DEX_API.vb b/Jobs/DEX_API/DEX_APIJob.vb similarity index 73% rename from Jobs/DEX_API/DEX_API.vb rename to Jobs/DEX_API/DEX_APIJob.vb index d464607a..953ec9c9 100644 --- a/Jobs/DEX_API/DEX_API.vb +++ b/Jobs/DEX_API/DEX_APIJob.vb @@ -5,15 +5,15 @@ Imports DigitalData.Modules.Database Imports DigitalData.Modules.Interfaces Imports DigitalData.Modules.Logging -Public Class DEX_API +Public Class DEX_APIJob Inherits JobBase - Implements IJob(Of ADSyncArgs) + Implements IJob(Of APISQLArgs) Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer) MyBase.New(LogConfig, MSSQL) End Sub - Public Sub StartDex_API(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start + Public Sub StartDex_API(Arguments As APISQLArgs) Implements IJob(Of APISQLArgs).Start Dim oJobName As String = [GetType]().Name Try @@ -27,7 +27,7 @@ Public Class DEX_API End Try End Sub - Public Function ShouldStart(Arguments As ADSyncArgs) As Boolean Implements IJob(Of ADSyncArgs).ShouldStart + Public Function ShouldStart(Arguments As APISQLArgs) As Boolean Implements IJob(Of APISQLArgs).ShouldStart Return Arguments.Enabled End Function diff --git a/Jobs/JobConfig.vb b/Jobs/JobConfig.vb index 19ef04d9..2a23562b 100644 --- a/Jobs/JobConfig.vb +++ b/Jobs/JobConfig.vb @@ -17,5 +17,6 @@ Public Class JobConfig ADSync GraphQL Test + API_SQL End Enum End Class \ No newline at end of file diff --git a/Jobs/Jobs.vbproj b/Jobs/Jobs.vbproj index 2050e471..a5eb4384 100644 --- a/Jobs/Jobs.vbproj +++ b/Jobs/Jobs.vbproj @@ -69,7 +69,9 @@ - + + +