Created
June 20, 2020 14:53
-
-
Save romainbsl/a3e1f42ceeb2cf3fb5c346d59cc6a3e4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @ThreadLocal | |
| object CommonInjector { | |
| val kodeinContainer = DI.lazy { | |
| importAll(databaseModule, loginModule, participantModule) | |
| } | |
| // Direct access to the presenters | |
| fun participantListPresenter() = kodeinContainer.direct.instance<ParticipantList.Presenter>() | |
| fun participantCreationPresenter() = kodeinContainer.direct.instance<ParticipantCreation.Presenter>() | |
| fun voteCreationPresenter() = kodeinContainer.direct.instance<VoteCreation.Presenter>() | |
| fun photoUploadPresenter() = kodeinContainer.direct.instance<PhotoUpload.Presenter>() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment