mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Give template parameters more meaningful names
This commit is contained in:
parent
5df222f509
commit
6fb34bb233
|
@ -15,13 +15,13 @@ class Container {
|
||||||
private this() {
|
private this() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Registration register(T)() {
|
public static Registration register(ClassType)() {
|
||||||
Registration newRegistration = { typeid(T) };
|
Registration newRegistration = { typeid(ClassType) };
|
||||||
registrations[newRegistration.registratedType] = newRegistration;
|
registrations[newRegistration.registratedType] = newRegistration;
|
||||||
return newRegistration;
|
return newRegistration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static T resolve(T)() {
|
public static ClassType resolve(ClassType)() {
|
||||||
return cast(T) registrations[typeid(T)].getInstance();
|
return cast(ClassType) registrations[typeid(ClassType)].getInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue