mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Finish refactoring for now
It's still not perfect, but traits are real difficult to work with.
This commit is contained in:
parent
d1e3366549
commit
a5f6a1dc32
|
@ -94,7 +94,6 @@ private void printDebugAutowiringCandidate(TypeInfo candidateInstanceType, void*
|
||||||
}
|
}
|
||||||
|
|
||||||
private void autowireMember(string member, Type)(DependencyContainer container, Type instance) {
|
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, instance, member)) && __traits(compiles, __traits(getAttributes, __traits(getMember, instance, 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))) {
|
foreach(autowireAttribute; __traits(getAttributes, __traits(getMember, instance, member))) {
|
||||||
static if (__traits(isSame, autowireAttribute, Autowire) || is(autowireAttribute == Autowire!T, T)) {
|
static if (__traits(isSame, autowireAttribute, Autowire) || is(autowireAttribute == Autowire!T, T)) {
|
||||||
|
|
Loading…
Reference in a new issue