Excellent article. This solved my resolution problem as I needed to resolve a Dependency from a c# Class library. Yes, I would like to know how to mock IDependencyService also, and would appreciate if you wrote a piece on that. Thanks.
Thanks. This is much clearer than Microsoft's documentation on dependency injection in Maui.
This is fine and I understand the approach for an app with a main page but how do you deal with DI for a TabbedPage app? I keep getting an error about having to write a type converter or provide a parameter less constructor. But I need to pass on a view model to my page. I’ve outlined the details on stack overflow on an article net-maui-how-to-use-dependency-injected-pages-form-tabbedpage
Renatas Laužadis
Hardcore Azure, C#, PowerShell, Hardcore continuous delivery, DevOps, SQL
Hi, Julian, why, when registering singleton, are you using Instance for DeviceService, but not for AudioService?