unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.81k stars 707 forks source link

[Docs] Improve Dependency Injection docs for vanilla Uno Platform app #10572

Open MartinZikmund opened 1 year ago

MartinZikmund commented 1 year ago

What would you like clarification on:

Currently the docs for Extensions DI https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Tutorials/DependencyInjection/HowTo-DependencyInjectionSetup.html cover only cases where the user already starts with Uno.Extensions-based solution. However, there is no documentation on how to integrate DI into a "vanilla" Uno Platform app based on the default Visual Studio template.

Concern?

For which Platform:

Anything else we need to know?

MartinZikmund commented 1 year ago

CC @nickrandolph

nickrandolph commented 1 year ago

Add Hosting support from this doc: https://platform.uno/docs/articles/external/uno.extensions/doc/Overview/Hosting/HostingOverview.html And then you can use Host.Services to access dependencies

Hosting
MartinZikmund commented 1 year ago

@nickrandolph I would then still suggest updating the doc to point to this link. I created this issue as I got report of someone who did not understand how to go about achieving this, so maybe the additional link would help

nickrandolph commented 1 year ago

Yeh docs review is in progress, so yes good suggestion.