invokeRequest method
Invokes the handler with a typed DTO and the previous value snapshot.
Implementation
Future<dynamic> invokeRequest(EventDTO dto, Object? lastData) {
final typed = EventDTO<T>.withKey(
EventKey<T>(dto.address),
dto.data as T,
arguments: dto.arguments,
correlationId: dto.correlationId,
);
return handler!(typed, lastData as T?);
}