Tharga / Console

Tharga Toolkit Console is used to simplify construction of advanced console applications.
MIT License
23 stars 6 forks source link

Call other Command from Command #4

Closed julianpaulozzi closed 8 years ago

julianpaulozzi commented 9 years ago

Some form of call another command within the active command? Or set the next command in front of ">"?

poxet commented 9 years ago

I am not sure what you mean. Do you have an example?

julianpaulozzi commented 9 years ago

I have utility command serving as a "parameters builder" for a more complex command (on RootCommand). Soon after 'build' would expose the command to run directly.

poxet commented 9 years ago

If I understand this correctly, you want the output of one command to be the input of another command.

For now, there is a workaround for this. I added an example named ParametersCommand where you can execute param build to build parameters and param execute that uses the same way of building parameters.

What it does is to have a method exposed (CreateParameters) that can be used by several commands.

This can also be used if you have commands that overlap and you do not want to have duplicate code.

Please get back to me if this soles you problem, and if not. A suggestion on how it should work would be great.