Skip to content

Instantly share code, notes, and snippets.

@ronstar
Created December 7, 2020 18:27
Show Gist options
  • Save ronstar/e0dabfd376130bc5a38a3f155c5123c8 to your computer and use it in GitHub Desktop.
Save ronstar/e0dabfd376130bc5a38a3f155c5123c8 to your computer and use it in GitHub Desktop.
DIC interface configurable
protocol DICProtocol {
func register<Service>(type: Service.Type, factoryClosure: @escaping FactoryClosure)
func resolve<Service>(type: Service.Type) -> Service?
func resolve<Service: Configurable>(type: Service.Type, configuration: Service.Configuration) -> Service?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment