bind Provider
inline fun <T : Any> DI.Builder.bindProvider(tag: Any? = null, overrides: Boolean? = null, noinline creator: DirectDI.() -> T)
Creates a factory: each time an instance is needed, the function creator function will be called.
T generics will be erased!
A provider is like a factory, but without argument.
Parameters
T
The created type.
creator
The function that will be called each time an instance is requested. Should create a new instance.