Projektdateien hinzufügen.
This commit is contained in:
48
ECM.JobRunner.Windows/WCF/Methods/Base.vb
Normal file
48
ECM.JobRunner.Windows/WCF/Methods/Base.vb
Normal file
@@ -0,0 +1,48 @@
|
||||
Imports System.Runtime.Serialization
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class Base
|
||||
Public Class BaseMethod
|
||||
Inherits BaseClass
|
||||
|
||||
Friend ReadOnly Database As MSSQLServer
|
||||
Friend ReadOnly State As State
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pState As State)
|
||||
MyBase.New(pLogConfig)
|
||||
Database = pDatabase
|
||||
State = pState
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public MustInherit Class BaseResponse
|
||||
<DataMember>
|
||||
Public Property OK As Boolean
|
||||
<DataMember>
|
||||
Public Property ErrorMessage As String
|
||||
<DataMember>
|
||||
Public Property ErrorDetails As String
|
||||
|
||||
Public Sub New()
|
||||
OK = True
|
||||
End Sub
|
||||
|
||||
Public Sub New(Message As String)
|
||||
OK = False
|
||||
ErrorMessage = Message
|
||||
End Sub
|
||||
|
||||
Public Sub New(Exception As Exception)
|
||||
OK = False
|
||||
ErrorMessage = Exception.Message
|
||||
End Sub
|
||||
|
||||
Public Sub New(Exception As Exception, Details As String)
|
||||
OK = False
|
||||
ErrorMessage = Exception.Message
|
||||
ErrorDetails = Details
|
||||
End Sub
|
||||
End Class
|
||||
End Class
|
||||
36
ECM.JobRunner.Windows/WCF/Methods/GetJobConfig.vb
Normal file
36
ECM.JobRunner.Windows/WCF/Methods/GetJobConfig.vb
Normal file
@@ -0,0 +1,36 @@
|
||||
Imports System.Runtime.Serialization
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports ECM.JobRunner.Common
|
||||
|
||||
Public Class GetJobConfig
|
||||
Public Class GetJobConfigMethod
|
||||
Inherits Base.BaseMethod
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pState As State)
|
||||
MyBase.New(pLogConfig, pDatabase, pState)
|
||||
End Sub
|
||||
|
||||
Public Function Run() As GetJobConfigResponse
|
||||
Return New GetJobConfigResponse With {
|
||||
.JobTypes = State.JobTypes,
|
||||
.JobDefinitions = State.JobDefinitions
|
||||
}
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class GetJobConfigResponse
|
||||
Inherits Base.BaseResponse
|
||||
|
||||
<DataMember>
|
||||
Public Property JobTypes As List(Of JobType)
|
||||
|
||||
<DataMember>
|
||||
Public Property JobDefinitions As List(Of JobDefinition)
|
||||
End Class
|
||||
|
||||
End Class
|
||||
|
||||
25
ECM.JobRunner.Windows/WCF/Methods/GetJobHistory.vb
Normal file
25
ECM.JobRunner.Windows/WCF/Methods/GetJobHistory.vb
Normal file
@@ -0,0 +1,25 @@
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports ECM.JobRunner.Common
|
||||
Imports System.Runtime.Serialization
|
||||
|
||||
Public Class GetJobHistory
|
||||
Public Class GetJobHistoryMethod
|
||||
Inherits Base.BaseMethod
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pState As State)
|
||||
MyBase.New(pLogConfig, pDatabase, pState)
|
||||
End Sub
|
||||
|
||||
Public Function Run() As GetJobHistoryResponse
|
||||
Return New GetJobHistoryResponse With {.Items = State.JobHistory.Entries}
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class GetJobHistoryResponse
|
||||
Inherits Base.BaseResponse
|
||||
|
||||
<DataMember>
|
||||
Public Property Items As List(Of HistoryItem)
|
||||
End Class
|
||||
End Class
|
||||
Reference in New Issue
Block a user