With Scope
Used to define bindings with a scope.
Parameters
C
The scope's Context.
Properties
Inheritors
Extensions
Link copied to clipboard
inline fun <C : Any, A : Any, T : Any> DI.BindBuilder.WithScope<C>.multiton( ref: RefMaker? = null, sync: Boolean = true, noinline creator: BindingDI<C>.(A) -> T): Multiton<C, A, T>
Content copied to clipboard
Creates a multiton: will create an instance on first request for each different argument and will subsequently always return the same instance for the same argument.
Link copied to clipboard
inline fun <C : Any, T : Any> DI.BindBuilder.WithScope<C>.singleton( ref: RefMaker? = null, sync: Boolean = true, noinline creator: NoArgBindingDI<C>.() -> T): Singleton<C, T>
Content copied to clipboard
Creates a singleton: will create an instance on first request and will subsequently always return the same instance.