mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
isFunction may not work
This commit is contained in:
parent
343dd65fdf
commit
4ebeeb9c9f
|
@ -267,9 +267,10 @@ class AutowiredRegistration(RegistrationType : Object) : Registration {
|
||||||
void delegate() preDestructor = null;
|
void delegate() preDestructor = null;
|
||||||
foreach (memberName; __traits(allMembers, RegistrationType)) {
|
foreach (memberName; __traits(allMembers, RegistrationType)) {
|
||||||
mixin(createImportsString!RegistrationType);
|
mixin(createImportsString!RegistrationType);
|
||||||
|
enum QualifiedName = fullyQualifiedName!RegistrationType ~ `.` ~ memberName;
|
||||||
static if (__traits(compiles, __traits(getProtection, __traits(getMember, instance, memberName)))
|
static if (__traits(compiles, __traits(getProtection, __traits(getMember, instance, memberName)))
|
||||||
&& __traits(getProtection, __traits(getMember, instance, memberName)) == "public"
|
&& __traits(getProtection, __traits(getMember, instance, memberName)) == "public"
|
||||||
&& isFunction!(mixin(fullyQualifiedName!RegistrationType ~ `.` ~ memberName))
|
&& isFunction!(QualifiedName)
|
||||||
&& hasUDA!(__traits(getMember, instance, memberName), PreDestroy)) {
|
&& hasUDA!(__traits(getMember, instance, memberName), PreDestroy)) {
|
||||||
preDestructor = &__traits(getMember, instance, memberName);
|
preDestructor = &__traits(getMember, instance, memberName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue