DerivedContainer

A dependency container that uses another container to resolve dependencies it doesn't know about itself.

Constructors

this
this(Container parent)
Undocumented in source.

Members

Functions

canResolve
bool canResolve(TypeInfo info)
Undocumented in source. Be warned that the author may not have intended to support it.
canResolve
bool canResolve(TypeInfo info, string name)
Undocumented in source. Be warned that the author may not have intended to support it.
withResolvedPtr
void withResolvedPtr(TypeInfo info, void delegate(void*) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
withResolvedPtr
void withResolvedPtr(TypeInfo info, string name, void delegate(void*) dg)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

parent
Container parent [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From SimpleContainer

addProvider
void addProvider(TypeInfo info, Provider provider)
Undocumented in source.
addProvider
void addProvider(TypeInfo info, string name, Provider provider)
Undocumented in source.
withResolvedPtr
void withResolvedPtr(TypeInfo info, void delegate(void*) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
withResolvedPtr
void withResolvedPtr(TypeInfo info, string name, void delegate(void*) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
canResolve
bool canResolve(TypeInfo info)
Undocumented in source. Be warned that the author may not have intended to support it.
canResolve
bool canResolve(TypeInfo info, string name)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

auto base = makeContainer();
base.value!int(6);
base.value!string("foo");

auto derived = base.derivedContainer();
derived.value!string("bar");

assert(derived.resolve!string() == "bar");
assert(derived.resolve!int() == 6);

Meta