allProviders

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

Retrieve all providers that match the given key.

Return

A list of matching providers.

Parameters

C

The key context type.

T

The key return type.

key

The key to look for.

context

The context to pass to the bindings.

overrideLevel

0 if looking for regular bindings, 1 or more if looking for bindings that have been overridden.

Throws

If no factory was found.

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