subDI

inline fun subDI(parentDI: DI, allowSilentOverride: Boolean = false, copy: Copy = Copy.NonCached, crossinline init: DI.MainBuilder.() -> Unit): LazyDI

Allow to create an extended version of a given DI container

Parameters

parentDI

the DI container that will be copied and extended

allowSilentOverride

Whether the configuration block is allowed to non-explicit overrides.

copy

The copy specifications, that defines which bindings will be copied to the new container. All bindings from the extended container will be accessible in the new container, but only the copied bindings are able to access overridden bindings in this new container. By default, all bindings that do not hold references (e.g. not singleton or multiton) are copied.

init

DI container configuration block