Binding Scopes
This section documents controlling the scope of the dependencies.
inSingletonScope()#
Each getting will return the same instance.
Example#
inTransientScope()#
New instance will be created with each getting.
Example#
inContainerScope()#
The container will return the same instance with each getting. This is similar to being a singleton, however if the container has a child container or a clone, that child container or clone will get an instance unique to it.
Example#
inResolutionScope()#
The same instance will be got for each getting of this dependency during a single resolution chain.