mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-14 19:54:00 +01:00
Itterate statically over members
This commit is contained in:
parent
0b64013115
commit
746e070f2d
|
@ -304,8 +304,8 @@ class AutowiredRegistration(RegistrationType : Object) : Registration {
|
|||
|
||||
private void delegate() getPreDestructor(RegistrationType instance) {
|
||||
void delegate() preDestructor = null;
|
||||
foreach (memberName; __traits(allMembers, RegistrationType)) {
|
||||
foreach (overload; __traits(getOverloads, instance, memberName)) {
|
||||
static foreach (memberName; __traits(allMembers, RegistrationType)) {
|
||||
static foreach (overload; __traits(getOverloads, instance, memberName)) {
|
||||
static if (__traits(compiles, __traits(getProtection, overload))
|
||||
&& __traits(getProtection, overload) == "public"
|
||||
&& isFunction!overload
|
||||
|
|
|
@ -420,8 +420,8 @@ synchronized class DependencyContainer {
|
|||
}
|
||||
|
||||
private void callPostConstructors(Type)(Type instance) {
|
||||
foreach (memberName; __traits(allMembers, Type)) {
|
||||
foreach (overload; __traits(getOverloads, instance, memberName)) {
|
||||
static foreach (memberName; __traits(allMembers, Type)) {
|
||||
static foreach (overload; __traits(getOverloads, instance, memberName)) {
|
||||
static if (__traits(compiles, __traits(getProtection, overload))
|
||||
&& __traits(getProtection, overload) == "public"
|
||||
&& isFunction!overload
|
||||
|
|
Loading…
Reference in a new issue