Register Services inside the UseCommunityToolkit call #1208
Closed
pictos
started this conversation in
New Feature Discussions
Replies: 1 comment
-
Closed as per the Community Stand-up discussion here: https://youtu.be/N9wMcBP4jtg?t=2889 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Today to use the Essentials APIs the user must register the methods manually, as you can see here on our sample app
Maui/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs
Lines 193 to 195 in 642b778
I suggest we move this registration inside our lib, that way we register the types, and it will be ready for devs to run. I would say is very rare case where the dev will implement their custom version of those services, and if they want, then they override our registration and they will be good to go.
We should measure if it will have a perf. hit, if so we can use
Lazy<T>
to instantiate the default types.Also, a friendly reminder that MCT isn't linker friendly, so the linker will run on it just if the user set the linker to be
Link all
. Not sure if you want to make MCT linker safer.Beta Was this translation helpful? Give feedback.
All reactions