Arguments with Spaces
Brought to you by:
arobinson74
Thank you for porting this to C#. I was excited to find it.
Unless I am doing something wrong there is a major problem though. All of our tools use the unix syntax for command line arguments:
--input FileA.png --output FileB.png
The Parse function works on each element of the string[] args parameter passed to C#'s main function individually. C# splits the argument string by spaces to build the array. As a result when the parser runs it correctly locates the -input parameter, but it cannot locate the value of the parameter because the parameter is actually in the next element of the array.
A workaround is to use --input=FileA.png --output==FileB.png instead.
The space syntax should be supported.
Argh... OK, now it works. Stepping through the code I can see it parses the later arguments. I think what happened is I was using the single dash for arguments with the long argument name.