deferred

Wrap up a container into a deferring container.

Wraps up container into a deferring container which executes deferred actions when a component from it is requested from exterior and not interior of container. Therefore with help of it, is possible to solve circular dependency errors by deferring setting a dependency at a later time when dependents are fully constructed.

  1. auto deferred(T container, string deferredExecutionerIdentity)
    @safe
    deferred
    (
    T
    )
  2. auto deferred(T container)

Parameters

container T

container to wrap up in defferred container

deferredExecutionerIdentity string

identity of container for defferred actions that will be used by contained factories if needed.

Return Value

Type: auto

DefferedContainer!T

Meta