Refaktorierung: DEX_API durch APISQL ersetzt
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.
This commit is contained in:
4
Jobs/DEX_API/APISQLArgs.vb
Normal file
4
Jobs/DEX_API/APISQLArgs.vb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Public Class APISQLArgs
|
||||||
|
Inherits JobArgs
|
||||||
|
Public ProfileID As String
|
||||||
|
End Class
|
||||||
6
Jobs/DEX_API/APISQLConfig.vb
Normal file
6
Jobs/DEX_API/APISQLConfig.vb
Normal file
@@ -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
|
||||||
@@ -5,15 +5,15 @@ Imports DigitalData.Modules.Database
|
|||||||
Imports DigitalData.Modules.Interfaces
|
Imports DigitalData.Modules.Interfaces
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Public Class DEX_API
|
Public Class DEX_APIJob
|
||||||
Inherits JobBase
|
Inherits JobBase
|
||||||
Implements IJob(Of ADSyncArgs)
|
Implements IJob(Of APISQLArgs)
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
|
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
|
||||||
MyBase.New(LogConfig, MSSQL)
|
MyBase.New(LogConfig, MSSQL)
|
||||||
End Sub
|
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
|
Dim oJobName As String = [GetType]().Name
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -27,7 +27,7 @@ Public Class DEX_API
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
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
|
Return Arguments.Enabled
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -17,5 +17,6 @@ Public Class JobConfig
|
|||||||
ADSync
|
ADSync
|
||||||
GraphQL
|
GraphQL
|
||||||
Test
|
Test
|
||||||
|
API_SQL
|
||||||
End Enum
|
End Enum
|
||||||
End Class
|
End Class
|
||||||
@@ -69,7 +69,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ADSync\ADSyncArgs.vb" />
|
<Compile Include="ADSync\ADSyncArgs.vb" />
|
||||||
<Compile Include="ADSync\ADSyncJob.vb" />
|
<Compile Include="ADSync\ADSyncJob.vb" />
|
||||||
<Compile Include="DEX_API\DEX_API.vb" />
|
<Compile Include="DEX_API\APISQLArgs.vb" />
|
||||||
|
<Compile Include="DEX_API\APISQLConfig.vb" />
|
||||||
|
<Compile Include="DEX_API\DEX_APIJob.vb" />
|
||||||
<Compile Include="GraphQL\GraphQLArgs.vb" />
|
<Compile Include="GraphQL\GraphQLArgs.vb" />
|
||||||
<Compile Include="GraphQL\GraphQLConfig.vb" />
|
<Compile Include="GraphQL\GraphQLConfig.vb" />
|
||||||
<Compile Include="GraphQL\GraphQLJob.vb" />
|
<Compile Include="GraphQL\GraphQLJob.vb" />
|
||||||
|
|||||||
Reference in New Issue
Block a user