Created
January 3, 2020 19:07
-
-
Save anibalbastiass/dfbb16e57139162507d4a2ddeda2c759 to your computer and use it in GitHub Desktop.
GetLatestCurrenciesUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open class GetLatestCurrenciesUseCase @Inject constructor(private val currenciesRepository: ICurrenciesRepository) : | |
ResultUseCase<String, UiCurrencies>( | |
backgroundContext = Dispatchers.IO, | |
foregroundContext = Dispatchers.Main | |
) { | |
override suspend fun executeOnBackground(params: String): UiCurrencies? = | |
currenciesRepository.getLatestCurrencies(params) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment