All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.tech.skot.di.modelFrameworkModule.kt Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
package tech.skot.di

import tech.skot.core.di.BaseInjector
import tech.skot.core.di.module
import tech.skot.model.Device
import tech.skot.model.JvmSKPersistor
import tech.skot.model.PersistorFactory
import tech.skot.model.SKPersistor

val mockDevice = object : Device {
    private var localeInfos: Device.Locale = Device.Locale(language = "FR", country = "FR")
    override fun getLocaleInfos(): Device.Locale = localeInfos

    override var osVersion: String = "30"
}

actual val modelFrameworkModule = module {
    factory {
        object : PersistorFactory {
            override fun getPersistor(dbFileName: String, cache: Boolean) =
                JvmSKPersistor(dbFileName)
        }
    }

    factory { mockDevice }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy