Inject
@propertyWrapper
public class Inject<T>
Property wrapper that automatically resolve instance if such exist
-
Initializing with identifier and information if wrapper
setmethod needs to be activeDeclaration
Swift
public init(_ identifier: String, allowRegister: Bool = false)Parameters
identifierThe identifier that needs to be used for resolving
allowRegisterIf
truethan wrappersetmethod will automatically registernewValueintoNerdzInject -
Initializing with class type and information if wrapper
setmethod needs to be activeDeclaration
Swift
public convenience init<V>(_ type: V.Type, allowRegister: Bool = false)Parameters
typeThe instance that needs to be used for resolving
allowRegisterIf
truethan wrappersetmethod will automatically registernewValueintoNerdzInject -
Initializing with
Ttype and information if wrappersetmethod needs to be activeDeclaration
Swift
public convenience init(allowRegister: Bool = false)Parameters
allowRegisterIf
truethan wrappersetmethod will automatically registernewValueintoNerdzInject -
Wrapped value
Declaration
Swift
public var wrappedValue: T? { get set }
Inject Class Reference