You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.0 KiB

2 years ago
  1. //
  2. // Copyright © 2019 Swinject Contributors. All rights reserved.
  3. //
  4. /// This protocol is designed for the use to extend Swinject functionality.
  5. /// Do NOT use this protocol unless you intend to write an extension or plugin to Swinject framework.
  6. ///
  7. /// A type conforming Resolver protocol must conform _Resolver protocol too.
  8. public protocol _Resolver {
  9. /// This method is designed for the use to extend Swinject functionality.
  10. /// Do NOT use this method unless you intend to write an extension or plugin to Swinject framework.
  11. ///
  12. /// - Parameter name: The registration name.
  13. /// - Parameter option: A service key option for an extension/plugin.
  14. /// - Parameter invoker: A closure to execute service resolution.
  15. ///
  16. /// - Returns: The resolved service type instance, or nil if no service is found.
  17. // swiftlint:disable:next identifier_name
  18. func _resolve<Service, Arguments>(
  19. name: String?,
  20. option: ServiceKeyOption?,
  21. invoker: @escaping ((Arguments) -> Any) -> Any
  22. ) -> Service?
  23. }