Mwx

public class Mwx

The main interface for exposing and wrapping up the framework with set of functions for type register and resolve

Type Register

  • 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

    initialize

    A () -> T indicates the initialization closure of type inferred as T.

    Return Value

    The component context of the registered type.

Type Resolve

  • 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) -> T

    Parameters

    type

    A T.Type indicates the type being resolved

    Return Value

    An instance of the type resolved from component store.