suitableForInjection function
Checks if an InjectionRequest can be sufficiently executed within the current request/response context.
Implementation
bool suitableForInjection(
RequestContext req, ResponseContext res, InjectionRequest injection) {
return injection.parameters.values.any((p) {
if (p.match == null) return false;
var value = p.getValue(req);
return value == p.match;
});
}