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
Star0Β (0)You must be signed in to star a repository
About
π CLI hosting framework on System.CommandLine - ASP.NET Core-style host, POCO commands, attribute-mapped options, filters and a metadata source generator
[Command("message","Display text")]publicsealedclassMessageCommand:ICommandHandler{privatereadonlyILogger<MessageCommand>log;publicMessageCommand(ILogger<MessageCommand>log){this.log=log;}[Option<string>("--text","-t",Description="Text to show",Required=true)]publicstringText{get;set;}=default!;publicValueTaskExecuteAsync(CommandContextcontext){log.LogInformation("Show {Text}",Text);returnValueTask.CompletedTask;}}
Option names and aliases must not conflict in a command, including the help and version options. A conflict in a command type is a build error (SCL0005), and other conflicts make Build() throw InvalidOperationException.
π CLI hosting framework on System.CommandLine - ASP.NET Core-style host, POCO commands, attribute-mapped options, filters and a metadata source generator