Ejemplo n.º 1
0
 public ValueTask <int> ShowHelp(
     [FromService] ICoconaHelpMessageBuilder helpBuilder,
     [FromService] ICoconaConsoleProvider console
     )
 {
     console.Output.Write(helpBuilder.BuildAndRenderForCurrentContext());
     return(new ValueTask <int>(129));
 }
Ejemplo n.º 2
0
 public void ForContext(bool optionA, [FromService] ICoconaHelpMessageBuilder helpMessageBuilder)
 {
     // Show commands help. (same as `./HelpOnDemand --help`)
     Console.WriteLine(helpMessageBuilder.BuildAndRenderForCurrentContext());
 }
Ejemplo n.º 3
0
 public void Help([FromService] ICoconaHelpMessageBuilder helpMessageBuilder)
 {
     _console.Out.WriteLine(helpMessageBuilder.BuildAndRenderForCurrentContext());
 }
Ejemplo n.º 4
0
 private void ShowDefaultMessage()
 {
     _console.Output.Write(_helpBuilder.BuildAndRenderForCurrentContext());
 }