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
Is your feature request related to a problem? Please describe.
I want to be able to print something every time my cli starts. With Spectre.Console.Cli, I would need to do that in every command handler instead of one, single place.
Describe the solution you'd like
I gave it a thought and think the ability to register a IStartupInterceptor in the type registrar would be nice. It would then be called directly after the command was processed but before the command is executed.
Describe alternatives you've considered
As I said earlier, without this, I would need to add this print (or anything else I want for every command) to each command individually. This is unnecessary, error prone and noisy.
Additional context
The IStartupInterceptor is akin to the ICommandInterceptor, so the concept itself is not foreign to the project.
In addition, it would be nice if both, the IStartupInterceptor and the ICommandInterceptor would be able to access the ITypeResolver, so they can run access any services they need without constructor injection.
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I want to be able to print something every time my cli starts. With Spectre.Console.Cli, I would need to do that in every command handler instead of one, single place.
Describe the solution you'd like
I gave it a thought and think the ability to register a
IStartupInterceptor
in the type registrar would be nice. It would then be called directly after the command was processed but before the command is executed.Describe alternatives you've considered
As I said earlier, without this, I would need to add this print (or anything else I want for every command) to each command individually. This is unnecessary, error prone and noisy.
Additional context
The
IStartupInterceptor
is akin to theICommandInterceptor
, so the concept itself is not foreign to the project.In addition, it would be nice if both, the
IStartupInterceptor
and theICommandInterceptor
would be able to access theITypeResolver
, so they can run access any services they need without constructor injection.Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: