DIScope

public class DIScope

Scopes need for control lifetime of your objects

  • Scope name. Used in logging

    Declaration

    Swift

    public let name: String
  • Make Scope. Scopes need for control lifetime of your objects

    Declaration

    Swift

    public init(name: String, storage: DIStorage, policy: DILifeTime.ReferenceCounting = .strong, parent: DIScope? = nil)

    Parameters

    name

    Scope name. need for logging

    storage

    data storing policy

    policy

    weak or strong. For weak policy DI wrapped objects use Weak class and save wrapped objects into storage.

    parent

    Checks the parent scope before making an object

  • Remove all saved objects

    Declaration

    Swift

    public func clean()