register

inline fun <T : Any> register(service: Any)

Register a service for a type, specified by generic parameter Typical usage would be to register the singleton implementation of an interface

Parameters

T
  • Type, usually an interface, to register under

service
  • The implementation


inline fun <T : Any> register(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

Parameters

T
  • Type, usually an interface, to register under

registration
  • Lambda that returns the implementation