This commit is contained in:
Pieter Venter 2020-11-22 22:38:48 -05:00 коммит произвёл Jon Sequeira
Родитель aa886d9e81
Коммит 7362139354
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -161,7 +161,7 @@ The value of fileOption is: null
## Middleware Pipeline
While each command has a handler which `System.CommandLine` will route to based on input, there is also a mechanism for short circuiting or altering the input before invoking you application logic. In between parsing and invocation, there is a chain of responsibility, which you can customize. A number of features of `System.CommandLine` make use of this. This is how the `--help` and `--version` options short circuit calls to your handler.
While each command has a handler which `System.CommandLine` will route to based on input, there is also a mechanism for short circuiting or altering the input before invoking your application logic. In between parsing and invocation, there is a chain of responsibility, which you can customize. A number of features of `System.CommandLine` make use of this. This is how the `--help` and `--version` options short circuit calls to your handler.
Each call in the pipeline can take action based on the `ParseResult` and return early, or choose to call the next item in the pipeline. The `ParseResult` can even be replaced during this phase. The last call in the chain is the handler for the specified command.