provide

inline fun <T> DependencyProvider.provide(name: String? = null, noinline provide: DependencyResolver.() -> T?)(source)

Basic call for providing a dependency, like provide<Service> { ServiceImpl() }.

Report a problem


inline fun <E> DependencyRegistry.provide(crossinline function: suspend () -> E): DependencyRegistry.KeyContext<E>(source)

Registers a dependency provider that takes no parameters and returns a value of type E.

Report a problem

Return

A DependencyRegistry.KeyContext for further configuration of the dependency

Parameters

E

The type of dependency to be provided

function

A function that creates and returns an instance of E


inline fun <E, I1> DependencyRegistry.provide(crossinline function: suspend (I1) -> E): DependencyRegistry.KeyContext<E>(source)

Registers a dependency provider that takes one input parameter and returns a value of type E.

Report a problem

Return

A DependencyRegistry.KeyContext for further configuration of the dependency

Parameters

E

The type of dependency to be provided

I1

The type of the first input parameter

function

A function that takes one parameter of type I1 and returns an instance of E


inline fun <E, I1, I2> DependencyRegistry.provide(crossinline function: suspend (I1, I2) -> E): DependencyRegistry.KeyContext<E>(source)

Registers a dependency provider that takes two input parameters and returns a value of type E.

Report a problem

Return

A DependencyRegistry.KeyContext for further configuration of the dependency

Parameters

E

The type of dependency to be provided

I1

The type of the first input parameter

I2

The type of the second input parameter

function

A function that takes two parameters and returns an instance of E


inline fun <E, I1, I2, I3> DependencyRegistry.provide(crossinline function: suspend (I1, I2, I3) -> E): DependencyRegistry.KeyContext<E>(source)

Registers a dependency provider that takes three input parameters and returns a value of type E.

Report a problem

Return

A DependencyRegistry.KeyContext for further configuration of the dependency

Parameters

E

The type of dependency to be provided

I1

The type of the first input parameter

I2

The type of the second input parameter

I3

The type of the third input parameter

function

A function that takes three parameters and returns an instance of E


inline fun <E, I1, I2, I3, I4> DependencyRegistry.provide(crossinline function: suspend (I1, I2, I3, I4) -> E): DependencyRegistry.KeyContext<E>(source)

Registers a dependency provider that takes four input parameters and returns a value of type E.

Report a problem

Return

A DependencyRegistry.KeyContext for further configuration of the dependency

Parameters

E

The type of dependency to be provided

I1

The type of the first input parameter

I2

The type of the second input parameter

I3

The type of the third input parameter

I4

The type of the fourth input parameter

function

A function that takes four parameters and returns an instance of E


inline fun <E, I1, I2, I3, I4, I5> DependencyRegistry.provide(crossinline function: suspend (I1, I2, I3, I4, I5) -> E): DependencyRegistry.KeyContext<E>(source)

Registers a dependency provider that takes five input parameters and returns a value of type E.

Report a problem

Return

A DependencyRegistry.KeyContext for further configuration of the dependency

Parameters

E

The type of dependency to be provided

I1

The type of the first input parameter

I2

The type of the second input parameter

I3

The type of the third input parameter

I4

The type of the fourth input parameter

I5

The type of the fifth input parameter

function

A function that takes five parameters and returns an instance of E


inline fun <E, I1, I2, I3, I4, I5, I6> DependencyRegistry.provide(crossinline function: suspend (I1, I2, I3, I4, I5, I6) -> E): DependencyRegistry.KeyContext<E>(source)

Registers a dependency provider that takes six input parameters and returns a value of type E.

Report a problem

Return

A DependencyRegistry.KeyContext for further configuration of the dependency

Parameters

E

The type of dependency to be provided

I1

The type of the first input parameter

I2

The type of the second input parameter

I3

The type of the third input parameter

I4

The type of the fourth input parameter

I5

The type of the fifth input parameter

I6

The type of the sixth input parameter

function

A function that takes six parameters and returns an instance of E