action method

void action(
  1. MessageActionDescriptor<M, D, C> action, [
  2. ActionResult actionResult = ActionResult.handled
])

Indicates that an action should take place when handling a message, and that no state transition should occur.

The act builder can be used to specify the action that should take place.

Implementation

void action(
  MessageActionDescriptor<M, D, C> action, [
  ActionResult actionResult = ActionResult.handled,
]) {
  descriptor = makeStayOrUnhandledDescriptor<M, D, C>(
    _makeContext,
    _log,
    _forState,
    action,
    null,
    _messageName,
    handled: actionResult == ActionResult.handled,
  );
}