Created
December 8, 2020 06:58
-
-
Save ronstar/b46b6980b1e08fa2cccc51e7a592f809 to your computer and use it in GitHub Desktop.
Configurable example
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
dic.register(type: ServiceThreeConfigurable.self) { (dic) -> AnyObject in // 1 | |
return ServiceThreeConfigurable(serviceOne: dic.resolve(type: ServiceOneProtocol.self)!) | |
} | |
let configuration = ServiceThreeConfigurable.ServiceThreeConfiguration(paramOne: true, paramTwo: Data()) // 2 | |
let serviceThree = dic.resolve(type: ServiceThreeConfigurable.self, configuration: configuration) // 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment