Finish refactoring for now

It's still not perfect, but traits are real difficult to work with.
This commit is contained in:
Mike Bierlee 2015-03-21 14:25:55 +01:00
parent d1e3366549
commit a5f6a1dc32

View file

@ -94,7 +94,6 @@ 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, 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)) {