Skip to content

Added startup interceptors #1789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ricardoboss
Copy link

@ricardoboss ricardoboss commented Mar 31, 2025

fixes #1788

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes

Added a new interface IStartupInterceptor that is called before any command is executed. It can be registered using the type registrar and receives a context object, which also has access to the type registrar.

I also added a property to the ICommandContext so that it can access the type registrar.


I know not all checkboxes above are checked and I know I didn't open a discussion first. I plan to still add documentation and tests. Since I'll open this as a draft, you can already give me feedback on the design before I do all the accompanying work.


Please upvote 👍 this pull request if you are interested in it.

@FrankRay78
Copy link
Contributor

Cool. I suggest adding some unit tests to demonstrate this functionality @ricardoboss.

Copy link
Contributor

@patriksvensson patriksvensson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All warnings need to be fixed as well.

@ricardoboss
Copy link
Author

@FrankRay78 @patriksvensson I made the changes you asked for. This still needs to be documented and I think maybe an easier way to register it would be nice. What do you think?

@ricardoboss ricardoboss marked this pull request as ready for review April 2, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Startup interceptors
3 participants