runNonzaHandlers method

Future<bool> runNonzaHandlers(
  1. XMLNode nonza
)

Runs all NonzaHandlers of this Manager which match the nonza. Resolves to true if the nonza has been handled by one of the handlers. Resolves to false otherwise.

Implementation

Future<bool> runNonzaHandlers(XMLNode nonza) async {
  var handled = false;
  await Future.forEach(getNonzaHandlers(), (NonzaHandler handler) async {
    if (handler.matches(nonza)) {
      handled = true;
      await handler.callback(nonza);
    }
  });

  return handled;
}