improve system of DI

This commit is contained in:
InsanusMokrassar 2018-09-04 11:00:41 +08:00
parent 0a2f095f46
commit 89d90a9345
3 changed files with 12 additions and 3 deletions

View File

@ -1,10 +1,13 @@
package com.github.insanusmokrassar.PsychomatrixBase.di.realisations
import com.github.insanusmokrassar.PsychomatrixBase.di.PresentationLayerDI
import com.github.insanusmokrassar.PsychomatrixBase.di.UseCasesDI
import com.github.insanusmokrassar.PsychomatrixBase.presentation.presenters.DatePickerPresenter
import com.github.insanusmokrassar.PsychomatrixBase.presentation.presenters.DefaultRealisations.DatePickerPresenterImpl
open class PresentationLayerDIImpl : PresentationLayerDI, UseCasesDIImpl() {
open class PresentationLayerDIImpl(
useCasesDI: UseCasesDI
) : PresentationLayerDI, UseCasesDI by useCasesDI {
override val datePickerPresenter: DatePickerPresenter by lazy {
DatePickerPresenterImpl(

View File

@ -1,7 +1,10 @@
package com.github.insanusmokrassar.PsychomatrixBase.di.realisations
import com.github.insanusmokrassar.PsychomatrixBase.di.PresentationLayerDI
import com.github.insanusmokrassar.PsychomatrixBase.di.UIDI
class UIDIImpl : UIDI, PresentationLayerDIImpl() {
class UIDIImpl(
presentationLayerDI: PresentationLayerDI
) : UIDI, PresentationLayerDI by presentationLayerDI {
}

View File

@ -1,10 +1,13 @@
package com.github.insanusmokrassar.PsychomatrixBase.di.realisations
import com.github.insanusmokrassar.PsychomatrixBase.di.EntitiesDI
import com.github.insanusmokrassar.PsychomatrixBase.di.UseCasesDI
import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDate
import com.github.insanusmokrassar.PsychomatrixBase.domain.interactors.CalculatePsychomatrixByDateInteractor
open class UseCasesDIImpl : UseCasesDI, EntitiesDIImpl() {
open class UseCasesDIImpl(
entitiesDI: EntitiesDI
) : UseCasesDI, EntitiesDI by entitiesDI {
override val calculatePsychomatrixByDate: CalculatePsychomatrixByDate by lazy {
CalculatePsychomatrixByDateInteractor()