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

Add intercept on decorator #55

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

idiotsky
Copy link

@idiotsky idiotsky commented Apr 3, 2024

Add support for register service with Interceptor and multiple decorator, apply Interceptor to the outermost decorator,

Fei Xu added 2 commits April 2, 2024 20:26
Created a new ProxyHelpers class to improve code structure and readability. This class centralizes proxy operations that were previously distributed across multiple classes. Refactored RegistrationExtensions.cs to replace direct method calls with references to the newly created ProxyHelpers.
DelegateMiddleware class is copied from autofac, after autofac add the overload method, remove this. Additionally, ServiceMiddlewareRegistrationExtensions has been added to provide static methods for registering middleware services. Tests have been provided to ensure correct interception of public interfaces. The Moq testing library has been added as a package reference.
@tillig
Copy link
Member

tillig commented Apr 3, 2024

A description on the PR here, possibly explaining it and linking back to the source issue, would be good. That way in a year from now when we come back and look to see what the point of the PR was (say, during supporting an issue) we have that to reference.

(Update the actual PR description; don't respond with the description here as a comment. Thanks!)

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 9 lines in your changes missing coverage. Please review.

Project coverage is 90.64%. Comparing base (2115f37) to head (c9f414e).

Files with missing lines Patch % Lines
src/Autofac.Extras.DynamicProxy/ProxyHelpers.cs 88.23% 3 Missing and 3 partials ⚠️
.../Autofac.Extras.DynamicProxy/DelegateMiddleware.cs 66.66% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #55      +/-   ##
===========================================
- Coverage    93.44%   90.64%   -2.80%     
===========================================
  Files            1        4       +3     
  Lines          122      139      +17     
  Branches        22       25       +3     
===========================================
+ Hits           114      126      +12     
- Misses           4        6       +2     
- Partials         4        7       +3     

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

@tillig
Copy link
Member

tillig commented Apr 25, 2024

From what I gather, this PR needs to go through first to help this one. I probably won't look at this one until that one is done.

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