doc / ch.tutteli.atrium.core.polyfills / loadSingleService

loadSingleService

expect fun <T : Any> loadSingleService(kClass: KClass<T>): T

Loads the service for the given kClass and throws an IllegalStateException if it finds more than one.

Exceptions

NoSuchElementException - in case there is no service found for kClass.

IllegalStateException - in case there is more than one service found for kClass.

Return
The loaded service.