scriptcs/scriptcs — pull request #146 by Codatrix (2013-03-23 01:04:03+00:00)
Title: #132:  Added version information

Version is now displayed whenever ScriptCs is launched. It does not require a command line argument.

Twice, I've had command argument implementations and unit tests all ready to go but could not figure out git mysteries like how to work on the dev branch or get things synced back to github and such.

I now have github mostly figured out but in the meantime, the code has changed so that command line arguments are either Commands (and only a single command gets executed at any given time) or they're handled on an ad-hoc basis (such as the debug flag). If I add a version flag, either it needs to become a Command, in which case all other flags specified on the same command line will be ignored. Or I can choose to handle the flag in Main() and output to the console before any of the other processing happens which means that specifying only the -v flag will always display the version information, an "invalid command" error message and the usage information.

Neither were the behavior I was hoping for. So I resorted to adding a single Console.WriteLine that always gets executed when the app launches.

I've learned a lot from the experience! Whether you accept this trivial change or not, thanks for the opportunity to contribute! :)