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

Is a DependencyService implementation class treated as a singleton.

$
0
0

Are dependency services treated as singletons? I have implemented a constructor in my dependency service that only gets called once from two independent callers.

I have implemented a common interface for abstracting platform specific hardware capabilities.

My shared code that calls the dependency service is similar to the following:
DependencyService.Get().MyMethod();

Does anyone know if there are any conditions in which a DependencyService class would call its deconstructor and force the constructor to be called again when another method was invoked?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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