Skip to content

Conversation

@zhiyuanliang-ms
Copy link
Member

@zhiyuanliang-ms zhiyuanliang-ms commented Nov 9, 2025

Why this PR?

#564

@jimmyca15
Copy link
Member

This implementation has a problem. VariantServiceProvider is supposed to play well with DI. The current implementation instantiates service instances outside of DI. This means if someone were to get the same service outside of the VariantServiceProvider, through DI directly, it will yield a different implementation instance than the one VariantServiceProvider uses. This is an anti pattern.

A proper solution to this needs to have VariantServiceProvider use the instance that DI would return.

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.

3 participants