Skip to content

[proof of concept] feat(VariantBasedInjection): Keyed DI PoC#605

Open
Stepami wants to merge 2 commits into
microsoft:mainfrom
Stepami:feature/keyed-di
Open

[proof of concept] feat(VariantBasedInjection): Keyed DI PoC#605
Stepami wants to merge 2 commits into
microsoft:mainfrom
Stepami:feature/keyed-di

Conversation

@Stepami
Copy link
Copy Markdown

@Stepami Stepami commented May 14, 2026

VariantServiceProvider uses sp to get keyed services

BREAKING CHANGE: behavioural: keyed services registration needed unless we override descriptors for backward comp

Why this PR?

Keyed DI can be used in FeatureManagement library as package-provided solution despite netstandard targeting

Visible Changes

VariantServiceProvider implementation changed

VariantServiceProvider uses sp to get keyed services

BREAKING CHANGE: behavioural: keyed services registration needed unless
we override descriptors for backward comp
@Stepami
Copy link
Copy Markdown
Author

Stepami commented May 14, 2026

@microsoft-github-policy-service agree

rename keyedServiceProvider to serviceProvider for clarity
@Stepami
Copy link
Copy Markdown
Author

Stepami commented May 15, 2026

I just thought that to avoid BC i could introduce LazyVariantServiceProvider class with keyed di as new implementation of IVariantServiceProvider. Then add WithLazyVariantService extension method. That could allow mark current implementation as obsolete to prepare consumers

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.

1 participant