|
@@ -142,6 +142,12 @@ namespace Inversion {
|
|
|
return register_module_factory_type(typeof(T), new ObjectFactory(typeof(T)));
|
|
return register_module_factory_type(typeof(T), new ObjectFactory(typeof(T)));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public T configure_with<T>() throws Error {
|
|
|
|
|
+ var scope = create_transient_scope();
|
|
|
|
|
+ var registration = scope.register_local_transient<T>();
|
|
|
|
|
+ return (T) scope.resolve_registration(registration);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public bool is_registered(Type type) {
|
|
public bool is_registered(Type type) {
|
|
|
return this.registrations.has(type);
|
|
return this.registrations.has(type);
|
|
|
}
|
|
}
|