Add Command line args parsing

This commit is contained in:
Jonathan Jenne
2020-11-16 16:30:40 +01:00
parent 83dedb3875
commit a35608d653
4 changed files with 73 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Logging.LogConfig
Imports System.Text.RegularExpressions
Namespace My
' Für MyApplication sind folgende Ereignisse verfügbar:
@@ -39,6 +40,13 @@ Namespace My
_Logger = LogConfig.GetLogger()
_Logger.Debug("Starting Client Suite..")
Dim oCommandLineArgs As New ClassCommandlineArgs(LogConfig)
Dim oArgs = Environment.GetCommandLineArgs().Skip(1).ToList()
oCommandLineArgs.Parse(oArgs)
CommandLineFunction = oCommandLineArgs.FunctionName
CommandLineArgs = oCommandLineArgs.FunctionArgs
End Sub
Public Sub App_Shutdown(sender As Object, e As EventArgs) Handles Me.Shutdown