Classes

The following classes are available globally.

  • Component Builder. To create a used function register(_:) in class ContainerBuilder. The class allows you to configure all the necessary properties for the component.

    See more

    Declaration

    Swift

    public final class DIComponentBuilder<Impl>
  • A container holding all registered components, allows you to register new components, parts, frameworks and allows you to receive objects by type.

    See more

    Declaration

    Swift

    public final class DIContainer
  • Allows you to find all frameworks marked as DIScanned in the application that satisfy certain characteristics: predicate - allows you to check a framework type both by its name or using the type itself Using:

    class YourScanFramework: DIScanFramework {
      override class var predicate: Predicate? { return .name({ $0.contains("ScannedFramework") }) }
    }
    

    OR

    class YourScanFramework: DIScanFramework {
      override class var predicate: Predicate? { return .type({ $0 is YourCustomFrameworkBase.Type }) }
    }
    
    See more

    Declaration

    Swift

    open class DIScanFramework : DIScan, DIFramework
  • Allows you to find all parts marked as DIScanned in the application that satisfy certain characteristics: predicate - allows you to check a part type both by its name or using the type itself bundle - leaves only those parts that are in the specified bundle Using:

    class YourScanPart: DIScanPart {
      override class var predicate: Predicate? { return .name({ $0.contains("ScannedPart") }) }
      override class var bundle: Bundle? { return YourBundle() }
    }
    

    OR

    class YourScanPart: DIScanPart {
      override class var predicate: Predicate? { return .type({ $0 is YourCustomPartBase.Type }) }
      override class var bundle: Bundle? { return Bundle(for: YourClass.self) }
    }
    
    See more

    Declaration

    Swift

    open class DIScanPart : DIScan, DIPart
  • The class provides the features to inject dependencies of view/window controllers in a storyboard. Needs to specify a container to inject dependencies in view/window controllers.

    See more

    Declaration

    Swift

    public final class DIStoryboard : _DIStoryboardBase