Closed
Description
From #2046:
Currently the only way for the users to implement custom directives is enabling directives parsing in the config, using this property to get parsed output:
and provide a custom, expensive Middleware.
We need to introduce a dedicated Directive
type that derives from Symbol
.
Initial requirements:
- introducing new
Directive
symbol type, with a possibility to define anAction<ParseResult, string>
which should be executed when directive is parsed (the list of arguments for the action is an open question, when implementing the feature it should became more obvious) - introducing
Command.Directives
property to allow users for defining directives - turning existing code into new directives
command-line-api/src/System.CommandLine/Parsing/ParseOperation.cs
Lines 350 to 378 in 76437b0
- extending tokenization and parsing with the concept of Directive
Metadata
Metadata
Assignees
Labels
No labels