CommunityToolkit / MVVM-Samples

Sample repo for MVVM package
Other
1.11k stars 222 forks source link

MVVM Toolkit Sample App - Stance on IoC class #96

Open xEsteem opened 2 years ago

xEsteem commented 2 years ago

Im a bit confused about the sample apps stance on the Ioc class. On the introduction page, the Ioc class is mentioned image However the rest of the app seems to deny its existence. For example, on the Inversion of Control page, its stated there that the toolkit provides no APIs to facilitate ioc or dependency injection or constructor injection (however does provide a link to the IOC class right below that, but then in the example below that it sets up the IServiceProvider in the app.xaml.cs and uses App.Current to get access to the service provider statically, rather than the Ioc class). Similarly in the Settings Service page, it states "It is also possible to use other patterns, such as the service locator pattern, but the MVVM Toolkit does not offer built-in APIs to enable that.", but thats exactly what the IoC class does, it provides a mechanism almost solely to simplify the service locator pattern.

Dont get me wrong, i dont like the IoC class, personally, but im a bit confused on the mixed messaging here in the sample app.