runContained method
Future
runContained(
- Function handler,
- RequestContext req,
- ResponseContext res, [
- Container? container,
Run a function after injecting from service container. If this function has been reflected before, then the execution will be faster, as the injection requirements were stored beforehand.
Implementation
Future runContained(Function handler, RequestContext req, ResponseContext res,
[Container? container]) {
container ??= Container(EmptyReflector());
return Future.sync(() {
if (_preContained.containsKey(handler)) {
return handleContained(handler, _preContained[handler]!, container)(
req, res);
}
return runReflected(handler, req, res, container);
});
}