I am busy with a console application, being a CLI to an API class that provides top level public methods for a data integration process. During development, it is necessary for me to frequently change the command line arguments in the project settings, debug section.
I am looking for a way to do this dynamically while avoiding the cost of a rebuild after each change a clumsy solution such as explicitly setting values in the string[] args
parameter list for entry point Main
.
The first solution that springs to mind is a custom config section in app.config, where I can define a collection of various command lines, each being a list of name-value pairs, and specify in an attribute of the command line collection which one should be active. The active command's name-value pairs will then be dynamically injected into said string[] args
parameter list by static, non-changing code.
Is there any other way to achieve this?