KordExContext

object KordExContext : KoinContext

The KoinContext for bot instances.

This contains the KoinApplication and its Koin instance for dependency injection.

To use this context, implement KordExKoinComponent.

See also

GlobalContext

Functions

Link copied to clipboard
open override fun get(): Koin

Gets the Koin instance.

Link copied to clipboard
fun getKoinApplicationOrNull(): KoinApplication?

Gets the KoinApplication or null if the KoinApplication has not yet been started.

Link copied to clipboard
open override fun getOrNull(): Koin?

Gets the Koin instance or null if the KoinApplication has not yet been started.

Link copied to clipboard
open override fun loadKoinModules(modules: List<Module>, createEagerInstances: Boolean)
open override fun loadKoinModules(module: Module, createEagerInstances: Boolean)

Mirroring the global Koin instance implementation.

Link copied to clipboard
open override fun startKoin(appDeclaration: KoinAppDeclaration): KoinApplication

Starts using the provided KoinAppDeclaration to create the KoinApplication for this context.

open override fun startKoin(koinApplication: KoinApplication): KoinApplication

Starts using the provided KoinApplication as the current one for this context.

Link copied to clipboard
open override fun stopKoin()

Closes and removes the current Koin instance.

Link copied to clipboard
open override fun unloadKoinModules(modules: List<Module>)

Unloads modules from the Koin instance.

open override fun unloadKoinModules(module: Module)

Unloads a module from the Koin instance.