© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
3 replies
mario12136

Transition to Microsoft's Dependency Injection Library

https://gist.github.com/MarioFares/f935dd74aa461feefb227631af1c2b3e

I was wondering what I can do to improve my App.xaml.cs file. I have seen this https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/ioc but one of my service implementations takes an argument and I am not sure how best to do that.

Otherwise, I am not sure if I am doing anything wrong.
Gist
Startup
Startup. GitHub Gist: instantly share code, notes, and snippets.
Startup
Ioc - .NET Community Toolkit
An introduction to the use of the IServiceProvider type through the Microsoft.Extensions.DependencyInjection APIs
Ioc - .NET Community Toolkit
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ How to use Microsoft Dependency Injection in Stylet
C#CC# / help
2y ago
Dependency injection
C#CC# / help
6mo ago
✅ Dependency injection
C#CC# / help
2y ago