set

abstract fun <T> set(key: DependencyKey, value: suspend DependencyResolver.() -> T)(source)

Associate the given dependency key with the corresponding initializer.

Report a problem

Parameters

key

The key containing type and name

value

The initialization script for the type

Type Parameters

T

The type of the value produced by the initializer function.

Throws

If the key is already registered in the provider.