When looking through the main app bootstrapper, the InjectionProxy
is used to register instances and interfaces. I noticed that interfaces can be registered as InstanceType.SingleInstance
(done for the database in the Tesla app) or InstanceType.EachResolve
. Further delving of the InjectionProxy
code shows that instances are always SingleInstance
.
What is the difference between SingleInstance
and EachResolve
, why would I choose my interfaces to be one or the other, and why are instances always set to be SingleIstance
?