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
It would be nice if I could specify options which are globally available for all commands. For example git has a global --namespace=<name> option, which allows the namespace to be set for all (sub)commands.
I'd imagine in Typin, this would mean a global model could be set on the CliApplicationBuilder using builder.UseGlobalOptions<MyGlobalOptionsModel>() after which the model would be available through DI.
The text was updated successfully, but these errors were encountered:
The point is that the CommandOption attribute requires the class to have the Command attribute witch means that the abstract class must be an available command
@ikkentim this will be implemented for Typin 4.0 due to the redesign of the library that will finally make it fully extensible. Probably global options will be implemented as a 'plugin'. I hope you don't mind waiting for it :)
@supapo I've verified this, and in terms of latest Typin release (3.0.4), there is no such limitation. I think that actually never did such a limitation exist. Abstract command DO NOT need CommandAttribute. CommandAttribute or OptionAttrbute DO NOT check for CommandAttribute. The only limitation is that you cannot have a interface with properties marked with CommandAttribute or OptionAttrbute because those attributes won't be read by Typin.
It would be nice if I could specify options which are globally available for all commands. For example
git
has a global--namespace=<name>
option, which allows the namespace to be set for all (sub)commands.I'd imagine in Typin, this would mean a global model could be set on the CliApplicationBuilder using
builder.UseGlobalOptions<MyGlobalOptionsModel>()
after which the model would be available through DI.The text was updated successfully, but these errors were encountered: