public ValueTask <int> ShowHelp( [FromService] ICoconaHelpMessageBuilder helpBuilder, [FromService] ICoconaConsoleProvider console ) { console.Output.Write(helpBuilder.BuildAndRenderForCurrentContext()); return(new ValueTask <int>(129)); }
public void Help([FromService] ICoconaHelpMessageBuilder helpMessageBuilder) { _console.Out.WriteLine(helpMessageBuilder.BuildAndRenderForCurrentContext()); }
public void ForContext(bool optionA, [FromService] ICoconaHelpMessageBuilder helpMessageBuilder) { // Show commands help. (same as `./HelpOnDemand --help`) Console.WriteLine(helpMessageBuilder.BuildAndRenderForCurrentContext()); }
public void ForCommand(bool optionA, [FromService] ICoconaHelpMessageBuilder helpMessageBuilder) { // Show a help for this command. (same as `./HelpOnDemand for-command --help`) Console.WriteLine(helpMessageBuilder.BuildAndRenderForCurrentCommand()); }
public BuiltInPrimaryCommand(ICoconaConsoleProvider console, ICoconaHelpMessageBuilder helpBuilder) { _console = console; _helpBuilder = helpBuilder; }