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

- Fix issues #148 #117 #155

Merged
merged 2 commits into from
Jan 28, 2022
Merged

Conversation

Mariachi1231
Copy link

This PR suppose to cover #148 #117. The problem was that decorable service was registered, most likely, as self. Which causing recursion according to a previous logic. Now, we are comparing the ImplementationType and ServiceType of the existing descriptors before decoration. If they are equal, this means that we cannot use ActivatorUtilities.GetServiceOrCreateInstance in the new descriptor, and the factory for it should use ActivatorUtilities.CreateInstance.

Described issue covered in separate test Issue148_Decorate_IsAbleToDecorateConcreateTypes.

@Mariachi1231
Copy link
Author

@khellang, are these changes make sense for Scrutor rep?

@khellang khellang merged commit 7e4f04d into khellang:master Jan 28, 2022
@khellang khellang added this to the v4.0.0 milestone Jan 28, 2022
@khellang
Copy link
Owner

Thanks for the PR @Mariachi1231! 🙏🏻 I've pushed v4.0.0 to NuGet.

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