registerOnce

inline fun <T : Any> registerOnce(noinline registration: Registration)

Lazily register a service builder for a type, specified by generic parameter Typical usage would be to register a builder method for the implementation of an interface If this service is already registered, a new registration will be ignored

Parameters

T
  • Type, usually an interface, to register under

registration
  • Lambda that returns the implementation