mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Check if a Type is registered
This commit is contained in:
parent
3d87339da6
commit
0c8c1434f7
|
@ -373,6 +373,12 @@ synchronized class DependencyContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isRegistered(RegistrationType)() {
|
||||||
|
TypeInfo typeInfo = typeid(RegistrationType);
|
||||||
|
auto candidates = typeInfo in registrations;
|
||||||
|
return candidates !is null;
|
||||||
|
}
|
||||||
|
|
||||||
private QualifierType resolveAutowiredInstance(QualifierType)(Registration registration) {
|
private QualifierType resolveAutowiredInstance(QualifierType)(Registration registration) {
|
||||||
QualifierType instance;
|
QualifierType instance;
|
||||||
if (!(cast(Registration[]) autowireStack).canFind(registration)) {
|
if (!(cast(Registration[]) autowireStack).canFind(registration)) {
|
||||||
|
|
Loading…
Reference in a new issue