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 active

    Declaration

    Swift

    public init(_ identifier: String, allowRegister: Bool = false)

    Parameters

    identifier

    The identifier that needs to be used for resolving

    allowRegister

    If true than wrapper set method will automatically register newValue into NerdzInject

  • Initializing with class type and information if wrapper set method needs to be active

    Declaration

    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 wrapper set method will automatically register newValue into NerdzInject

  • Initializing with T type and information if wrapper set method needs to be active

    Declaration

    Swift

    public convenience init(allowRegister: Bool = false)

    Parameters

    allowRegister

    If true than wrapper set method will automatically register newValue into NerdzInject

  • Wrapped value

    Declaration

    Swift

    public var wrappedValue: T? { get set }