ServiceManager

public protocol ServiceManager

Service manager.

  • Returns a service for the given key, or nil if the service is not found.

    Declaration

    Swift

    func findService<T>(_ key: Key<T>) -> T? where T : Service
  • getService(_:) Extension method

    Returns a service for the given key. Crashes if the service is not found.

    Declaration

    Swift

    func getService<T>(_ key: Key<T>) -> T where T : Service