xInjection - v2.1.2
    Preparing search index...

    Enumeration MiddlewareType

    Index

    Enumeration Members

    BeforeAddImport: 0

    Can be used to register a middleware which will be invoked right before importing a module into this module.

    The provided middleware callback can either return a boolean or a ProviderModule instance.

    Note: Returning true can be used to pass through the middleware without modifying the ProviderModule instance, while returning false will reject the request of importing that specific module.

    BeforeAddProvider: 1

    Can be used to register a middleware which will be invoked right before adding a provider to this module.

    The provided middleware callback can either return a boolean or a ProviderToken object type.

    Note: Returning true can be used to pass through the middleware without modifying the ProviderToken object, while returning false will reject the request of adding that specific provider.

    BeforeGet: 2

    Can be used to register a middleware which will be invoked right before a provider is returned to the consumer from this module container.

    The provided middleware callback can return anything.

    BeforeRemoveExport: 5

    Can be used to register a middleware which will be invoked right before removing an ExportDefinition from this module.

    Note: The provided middleware callback must return a boolean where true means that the ExportDefinition can be removed and false means to keep it.

    BeforeRemoveImport: 3

    Can be used to register a middleware which will be invoked right before removing an imported module from this module.

    Note: The provided middleware callback must return a boolean where true means that the imported module can be removed and false means to keep it.

    BeforeRemoveProvider: 4

    Can be used to register a middleware which will be invoked right before removing a provider from this module.

    Note: The provided middleware callback must return a boolean where true means that the provider can be removed and false means to keep it.

    OnExportAccess: 6

    Can be used to register a middleware which will be invoked each time a consumer module tries to access the ExportDefinition list of this module to get a provider.

    Note: The provided middleware callback will be invoked for each ProviderToken of the ExportsDefinition list and must return a boolean where true means that the ProviderToken is authorized to be used by the importer module.