Imports DigitalData.Modules.Logging
Imports Quartz

Public Class TestJob
    Implements Quartz.IJob

    Public Function Execute(context As IJobExecutionContext) As Task Implements Quartz.IJob.Execute
        Dim oJobData = context.MergedJobDataMap
        Dim oLogConfig As LogConfig = oJobData.Item("LogConfig")
        Dim oLogger = oLogConfig.GetLogger()

        Dim oArgs As Dictionary(Of String, String) = oJobData.Item("Args")

        If oArgs.ContainsKey("Arg1") Then
            Dim oArg1 As String = oArgs.Item("Arg1")
            oLogger.Info("Running Test Job With Arg1: {0}", oArg1)
        Else
            oLogger.Warn("Running Test Job With missing Arg1 :/")
        End If

        Return Task.FromResult(True)
    End Function
End Class