DIScanFramework
open class DIScanFramework : DIScan, DIFramework
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 }) }
}
-
Variants of the predicate on the basis of which these frameworks will be included.
- type->Bool: Allows you to specify method that will filter a frameworks by type.
- name->Bool: Allows you to specify method that will filter a frameworks by name.
Declaration
Swift
public enum Predicate
-
Predicate on the basis of which these frameworks will be included.
Declaration
Swift
open class var predicate: Predicate? { get }
-
implementation of the function for scan.
Declaration
Swift
public static func load(container: DIContainer)