provider

inline fun <R> Graph.provider(noinline block: ComponentBuilderBlock? = null): Provider<R>(source)

Creates a provider function that resolves the service of type R on every call.

Return

The provider function.

Parameters

block

An optional builder block to pass runtime dependencies to the factory.

Throws


fun <R> Graph.provider(key: TypeKey<R>, block: ComponentBuilderBlock? = null): Provider<R>(source)

Creates a provider function that resolves the service for key on every call.

Return

The provider function.

Parameters

key

The TypeKey of the service to resolve.

block

An optional builder block to pass runtime dependencies to the factory.

Throws