Protocols
The following protocols are available globally.
-
The
ConfigPropertyprotocol is registered automatically, and load the configuration properties from property files.When injecting an object that inherits this protocol, it will always inject the newly created object(like
Scope.prototype). Therefore, recommended implementing as struct-type.For example, this
ServerConfigstruct injects data corresponding to the “server” key of the property.
See morestruct ServerConfig: ConfigProperty { let target: String = "server" let url: String }Declaration
Swift
public protocol ConfigProperty -
The Inject protocol is the supporter that injects the dependency type.
It is not registered in IoC conatiner, but is registered in Graph at the time of build, and checks whether there is an invalid reference.
See moreDeclaration
Swift
public protocol Inject -
Internal access protocol.
Declaration
Swift
public protocol _Payload
View on GitHub
Protocols Reference