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