provider

open fun <C : Any, T : Any> provider(    key: DI.Key<C, Unit, T>,     context: C,     overrideLevel: Int = 0): () -> T

Retrieve a provider for the given key.

Return

The found provider.

Parameters

C

The key context type.

T

The key return type.

key

The key to look for.

context

The context to pass to the binding.

overrideLevel

0 if looking for the regular binding, 1 or more if looking for a binding that has been overridden.

Throws

If no provider was found.

When calling the provider function, if the instance construction triggered a dependency loop.