CoreDI

class CoreDI

DI management for the core module. Used for creating or closing a context graph used by koin for DI.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var koinContext: KoinApplication

KoinApplication that is used so we have our own independent context graph within the SDK. Created when the start() function is called.

Functions

Link copied to clipboard
fun loadModules(modules: List<Module>)

Loads the passed in modules into the private koin application context, if one has been set.

Link copied to clipboard
fun start(context: Context, environment: SBEnvironment, tokenManager: TokenManager?)

Needs be called before any DI is required, as its needed to build the context graph.

Link copied to clipboard
fun stop()

Closes the current context and releases its resources

Link copied to clipboard
fun unloadModules(modules: List<Module>)

Unloads the passed in modules from the private koin application context, if one has been set.