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

Make sure we support keyed services in client apps #20014

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Jan 19, 2024

Description of Change

New things in .NET 7 and we can't use it out the box.

Fixes #18992

@mattleibow mattleibow requested a review from a team as a code owner January 19, 2024 17:05
@Eilon Eilon added the area-core-hosting Extensions / Hosting / AppBuilder / Startup label Jan 20, 2024
@Eilon
Copy link
Member

Eilon commented Jan 20, 2024

@BrennanConroy / @halter73 - could one of you have a look at adding this support to .NET MAUI?

@halter73
Copy link
Member

I'm heading on vacation for the next two weeks. @benjaminpetit might also be able to help.

Copy link
Member

@BrennanConroy BrennanConroy left a comment

Choose a reason for hiding this comment

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

Does Maui look for attributes anywhere? There is the FromKeyedServicesAttribute if that's relevant to Maui.

src/Core/src/MauiContext.cs Show resolved Hide resolved
src/Core/tests/UnitTests/MauiContextTests.cs Show resolved Hide resolved
@mattleibow
Copy link
Member Author

Thanks for the review! I added a test for the attributes. All seems to be working.

Since maui "service provider" is just a wrapper of the real provider with some extra buttons, no new logic was really written.

@mattleibow mattleibow enabled auto-merge (squash) January 20, 2024 19:57
@mattleibow mattleibow changed the title Make sure we support keyed services Make sure we support keyed services in client apps Jan 20, 2024
@mattleibow mattleibow merged commit 7dbe853 into main Jan 22, 2024
47 checks passed
@mattleibow mattleibow deleted the dev/keyed branch January 22, 2024 16:29
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for KeyedServices
6 participants