mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Get member from instance instead
This commit is contained in:
parent
3d6ab10b6d
commit
3f36b63965
|
@ -96,8 +96,8 @@ private void printDebugAutowiringCandidate(TypeInfo candidateInstanceType, void*
|
|||
|
||||
private void autowireMember(string member, Type)(DependencyContainer container, Type instance) {
|
||||
// For the love of god, refactor this! <-- Doing it, bro!
|
||||
static if(__traits(compiles, __traits(getMember, Type, member)) && __traits(compiles, __traits(getAttributes, __traits(getMember, Type, member)))) {
|
||||
foreach(autowireAttribute; __traits(getAttributes, __traits(getMember, Type, member))) {
|
||||
static if(__traits(compiles, __traits(getMember, instance, member)) && __traits(compiles, __traits(getAttributes, __traits(getMember, instance, member)))) {
|
||||
foreach(autowireAttribute; __traits(getAttributes, __traits(getMember, instance, member))) {
|
||||
static if (__traits(isSame, autowireAttribute, Autowire) || is(autowireAttribute == Autowire!T, T)) {
|
||||
if (__traits(getMember, instance, member) is null) {
|
||||
alias memberReference = TypeTuple!(__traits(getMember, instance, member));
|
||||
|
|
Loading…
Reference in a new issue