The helper method Create.Option can take an optional materialize argument but it does nothing with it. This stumped me a little bit as I thought I could do something like the following:
// this doesn't work
private static Option VersionOption() =>
Create.Option("--version", "Show version information",
materialize: o => "My Version 1.0.0");
// this works
private static Option VersionOption() =>
Create.Option("--version", "Show version information",
Accept.NoArguments().MaterializeAs(o => "My Version 1.0.0"));
The helper method Create.Option can take an optional materialize argument but it does nothing with it. This stumped me a little bit as I thought I could do something like the following: