mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Also autowire baseclass members
This commit is contained in:
parent
0a0ac1bba2
commit
af7d6a7872
|
@ -19,7 +19,7 @@ debug {
|
||||||
class Autowire{};
|
class Autowire{};
|
||||||
|
|
||||||
public void autowire(Type)(Container container, Type instance) {
|
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 ~ `)`) ) {
|
foreach (attribute; mixin(`__traits(getAttributes, Type.` ~ member ~ `)`) ) {
|
||||||
if (is(attribute : Autowire) && __traits(getMember, instance, member) is null){
|
if (is(attribute : Autowire) && __traits(getMember, instance, member) is null){
|
||||||
alias TypeTuple!(__traits(getMember, instance, member)) memberReference;
|
alias TypeTuple!(__traits(getMember, instance, member)) memberReference;
|
||||||
|
|
Loading…
Reference in a new issue