Formatting
This commit is contained in:
parent
0d64e101f4
commit
f672b3062f
1 changed files with 6 additions and 3 deletions
|
@ -23,7 +23,8 @@ RequestHandler ioc(Function handler, {Iterable<String> optional: const []}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
resolveInjection(requirement, InjectionRequest injection, RequestContext req,
|
resolveInjection(requirement, InjectionRequest injection, RequestContext req,
|
||||||
ResponseContext res, bool throwOnUnresolved, [Container container]) {
|
ResponseContext res, bool throwOnUnresolved,
|
||||||
|
[Container container]) {
|
||||||
var propFromApp;
|
var propFromApp;
|
||||||
container ??= req?.container ?? res?.app?.container;
|
container ??= req?.container ?? res?.app?.container;
|
||||||
|
|
||||||
|
@ -57,9 +58,11 @@ resolveInjection(requirement, InjectionRequest injection, RequestContext req,
|
||||||
if (req.params.containsKey(key) ||
|
if (req.params.containsKey(key) ||
|
||||||
req.app.configuration.containsKey(key) ||
|
req.app.configuration.containsKey(key) ||
|
||||||
_primitiveTypes.contains(type)) {
|
_primitiveTypes.contains(type)) {
|
||||||
return resolveInjection(key, injection, req, res, throwOnUnresolved, container);
|
return resolveInjection(
|
||||||
|
key, injection, req, res, throwOnUnresolved, container);
|
||||||
} else
|
} else
|
||||||
return resolveInjection(type, injection, req, res, throwOnUnresolved, container);
|
return resolveInjection(
|
||||||
|
type, injection, req, res, throwOnUnresolved, container);
|
||||||
} else if (requirement is Type && requirement != dynamic) {
|
} else if (requirement is Type && requirement != dynamic) {
|
||||||
return container.make(requirement);
|
return container.make(requirement);
|
||||||
} else if (throwOnUnresolved) {
|
} else if (throwOnUnresolved) {
|
||||||
|
|
Loading…
Reference in a new issue