Inject
@propertyWrapper
public class Inject<T>
Property wrapper that automatically resolve instance if such exist
-
Initializing with identifier and information if wrapper
set
method needs to be activeDeclaration
Swift
public init(_ identifier: String, allowRegister: Bool = false)
Parameters
identifier
The identifier that needs to be used for resolving
allowRegister
If
true
than wrapperset
method will automatically registernewValue
intoNerdzInject
-
Initializing with class type and information if wrapper
set
method needs to be activeDeclaration
Swift
public convenience init<V>(_ type: V.Type, allowRegister: Bool = false)
Parameters
type
The instance that needs to be used for resolving
allowRegister
If
true
than wrapperset
method will automatically registernewValue
intoNerdzInject
-
Initializing with
T
type and information if wrapperset
method needs to be activeDeclaration
Swift
public convenience init(allowRegister: Bool = false)
Parameters
allowRegister
If
true
than wrapperset
method will automatically registernewValue
intoNerdzInject
-
Wrapped value
Declaration
Swift
public var wrappedValue: T? { get set }