Skip to content
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

Register service with Interceptor, then register multiple decorator, auto apply Interceptor to the outermost decorator #1439

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

idiotsky
Copy link

Register service with Interceptor, then register multiple decorator, auto apply Interceptor to the outermost decorator
Actually this is the default behaviors when I use autofac 4.x. after upgrade version 8.0.0, this not working any more.
I know explicit configure interceptor on the outermost decorator make it more clarity and flexibility. but I thinks we should keep the original behaviors some how, even it not the default behaviors.
This behaviors will benefit in case when add new decorator, we don't need remove the interceptor and add the interceptor to the new decorator.

Fei Xu added 2 commits December 11, 2024 18:28
These changes introduce new methods to register service middleware in the Autofac library. Also, a new test has been added to Autofac.Specification.Test to ensure that the middleware is getting invoked correctly when a service is registered. These methods allow for more precise control of the pipeline during the resolve request process.
This test verifies that middleware is evaluated correctly when using IfNotRegistered with a service descriptor. It ensures the middleware is invoked during the resolution pipeline as expected.
@idiotsky
Copy link
Author

Just Add the unit test for code coverage and create an new pull request, any suggestion, let me know.
#1416

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.06%. Comparing base (d2ed00a) to head (9453b96).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1439      +/-   ##
===========================================
+ Coverage    79.03%   79.06%   +0.02%     
===========================================
  Files          200      200              
  Lines         5682     5688       +6     
  Branches      1143     1143              
===========================================
+ Hits          4491     4497       +6     
  Misses         696      696              
  Partials       495      495              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@tillig tillig left a comment

Choose a reason for hiding this comment

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

Looks good - thanks for the help! We appreciate it.

@tillig tillig merged commit 9f6f57b into autofac:develop Dec 16, 2024
3 checks passed
@idiotsky
Copy link
Author

Looks good - thanks for the help! We appreciate it.

You are welcome

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.

2 participants