EventHandler<TEvent>.factory constructor

const EventHandler<TEvent>.factory(
  1. EventHandlerFactory<TEvent> factory
)

Factory based EventHandler

Each event the underlying factory will be instantiated and used to handle the TEvent.

Implementation

const factory EventHandler.factory(
  EventHandlerFactory<TEvent> factory,
) = _FactoryEventHandler;