Skip to content

Instantly share code, notes, and snippets.

@RBusarow
Created March 17, 2019 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RBusarow/4de22598078c92aaaeca8939640d8620 to your computer and use it in GitHub Desktop.
Save RBusarow/4de22598078c92aaaeca8939640d8620 to your computer and use it in GitHub Desktop.
Initialization of a repository using the CoroutineScope of the dependant class
class MyViewModel : BaseViewModel() {
val myRepository = MyRepositoryImpl(
coroutineScope = this + Dispatchers.IO
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment