Last active
May 3, 2020 22:36
-
-
Save PetkevichPavel/d5a690d0d95c83c7be9909013aff9595 to your computer and use it in GitHub Desktop.
SharedPreferences under Delegated properties - SomeRepository for test the pattern.
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
class SomeRepository( | |
private val someManager: SomeManager | |
) : ISomeRepository, BaseRepository() { | |
override val userId: Long? | |
get() = someManager.userId | |
override fun testSet(userId: Long) { | |
someManager.userId = userId | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment