Mwx
public class Mwx
The main interface for exposing and wrapping up the framework with set of functions for type register and resolve
-
Call this static function to register a type in the current component context store using SwiftDI injection engine.
Declaration
Swift
public static func register<T>(_ initialize: @escaping () -> T) -> DIComponentContext<T>Parameters
initializeA
() -> Tindicates the initialization closure of type inferred asT.Return Value
The component context of the registered type.
-
Call this static function to resolve a type from the current component context store using SwiftDI injection engine.
Declaration
Swift
public static func resolve<T>(_ type: T.Type) -> TParameters
typeA
T.Typeindicates the type being resolvedReturn Value
An instance of the type resolved from component store.
View on GitHub
Mwx Class Reference