with Delayed Callbacks
fun withDelayedCallbacks(allowSilentOverride: Boolean = false, init: DI.MainBuilder.() -> Unit): Pair<DI, () -> Unit>
Content copied to clipboard
Creates a DI object but without directly calling onReady callbacks.
Instead, returns both the di instance and the callbacks. Note that the returned di object should not be used before calling the callbacks.
This is an internal function that exists primarily to prevent DI.global recursion.
Return
a Pair with the DI object, and the callbacks function to call. Note that you should not use the DI object before calling the callbacks function.
Parameters
allowSilentOverride
Whether the configuration block is allowed to non-explicit overrides.
init
The block of configuration.