Skip to content

v1.5.0

Compare
Choose a tag to compare
@mayuki mayuki released this 12 Jul 09:35
· 197 commits to master since this release

Features

Introduce HelpMessageBuilder (#22, #23)

Introduce HelpMessageBuilder, which makes is easy to help messages can be displayed from user code.

// Show help for commands. (same as `./HelpOnDemand --help`)
public void ForContext(bool optionA, [FromService] ICoconaHelpMessageBuilder helpMessageBuilder)
{
    Console.WriteLine(helpMessageBuilder.BuildAndRenderForCurrentContext());
}

// Show help for this command. (same as `./HelpOnDemand for-command --help`)
public void ForCommand(bool optionA, [FromService] ICoconaHelpMessageBuilder helpMessageBuilder)
{
    Console.WriteLine(helpMessageBuilder.BuildAndRenderForCurrentCommand());
}