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

T

The type of the value produced by the initializer function.

key

The key containing type and name

value

The initialization script for the type

Throws

If the key is already registered in the provider.