I was considering modifying the switch code to allow being able to specify a switch as taking zero or more arguments.
For example, allow either of the following to specifically set the polling option from the command line
- "program -Polling"
- "program -Polling on"
and allow the following to turn it off from the command line:
It is going to be tricky to add new overrides to the Switch constructor, because there are already so many, and so many combinations of parameters, so I was considering just adding a static Switch constructor for this, eg,
- "static Switch Switch:CreateOptionalArgs(string name, int minArgCount, int maxArgCount, bool isRequired)"
(I'm omitting the other parameters for simplicity of discussion.)
I would then convert "m_hasArguments" into "m_minArguments" and "m_maxArguments", and use UnknownNumberArguments for unspecified max parameter count (as it is currently).
Thoughts?
I was considering modifying the switch code to allow being able to specify a switch as taking zero or more arguments.
For example, allow either of the following to specifically set the polling option from the command line
and allow the following to turn it off from the command line:
It is going to be tricky to add new overrides to the Switch constructor, because there are already so many, and so many combinations of parameters, so I was considering just adding a static Switch constructor for this, eg,
(I'm omitting the other parameters for simplicity of discussion.)
I would then convert "m_hasArguments" into "m_minArguments" and "m_maxArguments", and use UnknownNumberArguments for unspecified max parameter count (as it is currently).
Thoughts?