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

Support value-type service keys in ActivatorUtilities.CreateFactory() #106075

Closed
wants to merge 1 commit into from

Conversation

steveharter
Copy link
Member

Fixes #96140

@@ -418,7 +418,8 @@ private static void ThrowHelperUnableToResolveService(Type type, Type requiredBy
Expression.Constant(parameterType, typeof(Type)),
Expression.Constant(constructor.DeclaringType, typeof(Type)),
Expression.Constant(hasDefaultValue),
Expression.Constant(keyAttribute?.Key) };
Expression.Convert(Expression.Constant(keyAttribute?.Key), typeof(object)) };

Copy link
Member Author

Choose a reason for hiding this comment

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

Extra space here... To be removed

@ericstj
Copy link
Member

ericstj commented Aug 7, 2024

@steveharter can you have a look at #106059 and see if it's an OK?

@steveharter
Copy link
Member Author

Closing this PR in favor of #106059

@steveharter steveharter closed this Aug 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use a enum as a key for keyed services in controller constructor
2 participants