Also autowire baseclass members

This commit is contained in:
Mike Bierlee 2014-06-12 01:46:05 +02:00
parent 0a0ac1bba2
commit af7d6a7872

View file

@ -19,7 +19,7 @@ debug {
class Autowire{};
public void autowire(Type)(Container container, Type instance) {
foreach (member ; __traits(derivedMembers, Type)) {
foreach (member ; __traits(allMembers, Type)) {
foreach (attribute; mixin(`__traits(getAttributes, Type.` ~ member ~ `)`) ) {
if (is(attribute : Autowire) && __traits(getMember, instance, member) is null){
alias TypeTuple!(__traits(getMember, instance, member)) memberReference;