Builder
Allows for the DSL inside the block argument of the constructor of DI and DI.Module.
Methods of this classes are really just proxies to the DIContainer.Builder methods.
Types
Left part of the constant-binding syntax (constant(tag)).
Left part of the direct-binding syntax (bind(tag)).
Left part of the type-binding syntax (bind(type, tag)).
Functions
Starts a direct binding with a given tag. A direct bind does not define the type to be bound, the type will be defined according to the bound factory.
Attaches the binding of a given type with a given tag.
Starts a constant binding.
Like import but checks that will only import each module once.
Properties
Inheritors
Extensions
Creates a set: multiple bindings can be added in this set.
Attaches a binding to the DI container
Starts the binding of a given type with a given tag.
Starts a direct binding with a given tag. A direct bind does not define the type to be bound, the type will be defined according to the bound factory.
Creates a set: multiple bindings can be added in this set.
Binds a constant provider: will always return the given instance.
Binds an eager singleton: will create an instance as soon as kodein is ready (all bindings are set) and will always return this instance.
Binds an instance provider: will always return the given instance.
Creates a factory: each time an instance is needed, the function creator function will be called.
Binds a singleton: will create an instance on first request and will subsequently always return the same instance.
Used to define bindings with a context: bind<MyType>() with contexted<MyContext>().provider { /*...*/ }
Creates an eager singleton: will create an instance as soon as kodein is ready (all bindings are set) and will always return this instance.
Creates an instance provider: will always return the given instance.
Used to define bindings with a scope: bind<MyType>() with scoped(myScope).singleton { /*...*/ }
Creates a set: multiple bindings can be added in this set.