Last updated
Last updated
This demo illustrates how to extend CLArgs functionality to meet your custom needs.
Imagin you want a Context with a property having custom type that is not supported out of the box. There is no built-in converter to convert command-line arguments into a property of type DirectoryInfo
, and we need to create and register a custom converter.
Define the custom DirectoryInfo converter
Register the custom during start-up using ContextBuilderConfigureConverters.
Use the erros
collection instead of throwing exception if you want to collect and return multiple error results.