mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Fix registration of application contexts with non-public members
This commit is contained in:
parent
d87c8a0457
commit
965dcfb0a2
|
@ -6,6 +6,7 @@ Poodinis Changelog
|
|||
* DEPRECATE supplying register()'s registration options as variadic arguments. Use register(SuperType, ConcreteType)(RegistrationOption[]) instead.
|
||||
* ADD resolve options to container resolve()
|
||||
* ADD ability to register a type while resolving it. Use resolve option registerBeforeResolving
|
||||
* FIX registration of application contexts with non-public members
|
||||
|
||||
**Version 6.0.0**
|
||||
* CHANGE registration scopes are replaced by a single factory implementation. If you were not doing anything with the internal scope mechanism, you
|
||||
|
|
|
@ -44,8 +44,7 @@ struct Prototype {}
|
|||
|
||||
public void registerContextComponents(ApplicationContextType : ApplicationContext)(ApplicationContextType context, shared(DependencyContainer) container) {
|
||||
foreach (member ; __traits(allMembers, ApplicationContextType)) {
|
||||
static if (hasUDA!(__traits(getMember, context, member), Component)) {
|
||||
|
||||
static if (__traits(getProtection, __traits(getMember, context, member)) == "public" && hasUDA!(__traits(getMember, context, member), Component)) {
|
||||
auto factoryMethod = &__traits(getMember, context, member);
|
||||
Registration registration = null;
|
||||
auto createsSingleton = CreatesSingleton.yes;
|
||||
|
|
Loading…
Reference in a new issue