Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Non-empty constructor in DependencyService?

$
0
0

Is there anyway to register a concrete instance with the DependencyService, rather than using the assembly attribute?

I ask because I have a DAL, which is platform dependent, that also has a few dependencies. With other DI frameworks such as Unity it's able to autopopulate the constructor arguments.

Is the only choice to do the injection in the Forms after it's retrieved but before it's used? This leads to the anti-pattern where items are newed but not able to be used.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>