Skip to content

Instantly share code, notes, and snippets.

@chrsp
Last active January 27, 2021 14:59
Show Gist options
  • Save chrsp/c11f059172ec990b31d2afd3a00dd65d to your computer and use it in GitHub Desktop.
Save chrsp/c11f059172ec990b31d2afd3a00dd65d to your computer and use it in GitHub Desktop.
// Module: CleanArchitectureRestaurant
import Domain
import Data
import Presentation
final class DinningHallDIContainer {
func makeKitchenUseCase() -> KitchenUseCase {
let cooker = ItalianCooker()
let kitchenRemoteRepository = KitchenRemoteDataSource()
let kitchenLocalRepository = KitchenLocalDataSource()
return KitchenUseCase(localDataSource: kitchenLocalRepository,
remoteDataSource: kitchenRemoteRepository,
cooker: cooker)
}
func makeDinningHallViewModel() -> DinningHallViewModel {
DinningHallViewModel(kitchenUseCase: makeKitchenUseCase())
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment