singleton0
fun <SRV : Any, IMPL : SRV> singleton0(srv: KClass<SRV>, factory: () -> IMPL): KontainerBuilder
Content copied to clipboard
Create a singleton via a factory method with 0 injected parameters
The service can by injected by the type SRV and its base types The actual implementation will have the type IMPL