Inject
public protocol Inject
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.
-
Inject(_:qualifier:resolveRole:)
Extension methodGet instance for type.
Declaration
Swift
static func Inject<T>( _ type: T.Type, qualifier: String? = nil, resolveRole: ResolveRole = .recursive ) -> T
Parameters
type
The dependency type to resolve.
qualifier
The registered qualifier.
resolveRole
The resolve role(default: recursive)
Return Value
The resolved instance.
-
Inject(_:qualifier:resolveRole:)
Extension methodGet instance list for type.
Declaration
Swift
static func Inject<T>( _ type: [T].Type, qualifier: String? = nil, resolveRole: ResolveRole = .default ) -> [T]
Parameters
type
The dependency type to resolve.
qualifier
The registered qualifier.
resolveRole
The resolve role.
Return Value
The resolved instances, or empty.
-
Inject(_:with:resolveRole:)
Extension methodGet instance for type by factory.
Declaration
Swift
static func Inject<T: Factory>( _ type: T.Type, with argument: T.RawPayload.Tuple, resolveRole: ResolveRole = .recursive ) -> T
Parameters
type
The dependency type to resolve.
argument
User data for resolve.
resolveRole
The resolve role(default: recursive)
Return Value
The resolved instance.
-
Inject(_:with:resolveRole:)
Extension methodGet instance list for type by factory.
Declaration
Swift
static func Inject<T: Factory>( _ type: [T].Type, with argument: T.RawPayload.Tuple, resolveRole: ResolveRole = .default ) -> [T]
Parameters
type
The dependency type to resolve.
argument
User data for resolve.
resolveRole
The resolve role.
Return Value
The resolved instances, or emtpy.
-
Inject(_:qualifierBy:resolveRole:)
Extension methodGet instance for type.
Declaration
Swift
static func Inject<T>( _ type: T.Type, qualifierBy: String, resolveRole: ResolveRole = .recursive ) -> T
Parameters
type
The dependency type to resolve.
qualifierBy
The registered qualifier by property.
resolveRole
The resolve role(default: recursive)
Return Value
The resolved instance.
-
Inject(_:qualifierBy:resolveRole:)
Extension methodGet instance list for type.
Declaration
Swift
static func Inject<T>( _ type: [T].Type, qualifierBy: String, resolveRole: ResolveRole = .default ) -> [T]
Parameters
type
The dependency type to resolve.
qualifierBy
The registered qualifier by property.
resolveRole
The resolve role.
Return Value
The resolved instances, or empty.
-
InjectProperty(_:resolveRole:)
Extension methodGet property.
Declaration
Swift
static func InjectProperty( _ path: String, resolveRole: ResolveRole = .default ) -> String
Parameters
path
Property path.
resolveRole
The resolve role.
Return Value
The property.
-
Inject(_:qualifier:resolveRole:)
Extension methodGet instance for type.
Declaration
Swift
func Inject<T>( _ type: T.Type, qualifier: String? = nil, resolveRole: ResolveRole = .recursive ) -> T
Parameters
type
The dependency type to resolve.
qualifier
The registered qualifier.
resolveRole
The resolve role(default: recursive)
Return Value
The resolved instance.
-
Inject(_:qualifier:resolveRole:)
Extension methodGet instance list for type.
Declaration
Swift
func Inject<T>( _ type: [T].Type, qualifier: String? = nil, resolveRole: ResolveRole = .default ) -> [T]
Parameters
type
The dependency type to resolve.
qualifier
The registered qualifier.
resolveRole
The resolve role.
Return Value
The resolved instances, or empty.
-
Inject(_:with:resolveRole:)
Extension methodGet instance for type by factory.
Declaration
Swift
func Inject<T: Factory>( _ type: T.Type, with argument: T.RawPayload.Tuple, resolveRole: ResolveRole = .recursive ) -> T
Parameters
type
The dependency type to resolve.
argument
User data for resolve.
resolveRole
The resolve role(default: recursive)
Return Value
The resolved instance.
-
Inject(_:with:resolveRole:)
Extension methodGet instance list for type by factory.
Declaration
Swift
func Inject<T: Factory>( _ type: [T].Type, with argument: T.RawPayload.Tuple, resolveRole: ResolveRole = .default ) -> [T]
Parameters
type
The dependency type to resolve.
argument
User data for resolve.
resolveRole
The resolve role.
Return Value
The resolved instances, or emtpy.
-
Inject(_:qualifierBy:resolveRole:)
Extension methodGet instance for type.
Declaration
Swift
func Inject<T>( _ type: T.Type, qualifierBy: String, resolveRole: ResolveRole = .recursive ) -> T
Parameters
type
The dependency type to resolve.
qualifierBy
The registered qualifier by property.
resolveRole
The resolve role(default: recursive)
Return Value
The resolved instance.
-
Inject(_:qualifierBy:resolveRole:)
Extension methodGet instance list for type.
Declaration
Swift
func Inject<T>( _ type: [T].Type, qualifierBy: String, resolveRole: ResolveRole = .default ) -> [T]
Parameters
type
The dependency type to resolve.
qualifierBy
The registered qualifier by property.
resolveRole
The resolve role.
Return Value
The resolved instances, or empty.
-
InjectProperty(_:resolveRole:)
Extension methodGet property.
Declaration
Swift
func InjectProperty( _ path: String, resolveRole: ResolveRole = .default ) -> String
Parameters
path
Property path.
resolveRole
The resolve role.
Return Value
The property.