You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are numerous compile errors because of unresolved symbols, e.g. config.SetHelpProvider and HelpProvider.
The example code is bringing in a shared library, that only seems to exist in the examples project.
Am I missing something??
usingSpectre.Console;usingSpectre.Console.Cli;usingSpectre.Console.Rendering;namespaceHelp;//internalclassCustomHelpProvider:HelpProvider{publicCustomHelpProvider(ICommandAppSettingssettings):base(settings){}publicoverrideIEnumerable<IRenderable>GetHeader(ICommandModelmodel,ICommandInfo?command){returnnew[]{newText("--------------------------------------"),Text.NewLine,newText("--- CUSTOM HELP PROVIDER ---"),Text.NewLine,newText("--------------------------------------"),Text.NewLine,Text.NewLine,};}}//publicsealedclassDefaultCommand:Command{privateIAnsiConsole_console;publicDefaultCommand(IAnsiConsoleconsole){_console=console;}publicoverrideintExecute(CommandContextcontext){_console.WriteLine("Hello world");return0;}}//publicstaticclassProgram{publicstaticintMain(string[]args){varapp=newCommandApp<DefaultCommand>();app.Configure(config =>{// Register the custom help providerconfig.SetHelpProvider(newCustomHelpProvider(config.Settings));});returnapp.Run(args);}}
The text was updated successfully, but these errors were encountered:
Information
Describe the bug
Below program tries to create a new HelpProvider like described here: https://spectreconsole.net/cli/command-help and here: https://github.com/spectreconsole/spectre.console/tree/main/examples/Cli/Help
There are numerous compile errors because of unresolved symbols, e.g.
config.SetHelpProvider
andHelpProvider
.The example code is bringing in a shared library, that only seems to exist in the examples project.
Am I missing something??
The text was updated successfully, but these errors were encountered: