addAll method

  1. @override
S addAll(
  1. Iterable<E> events
)
override

Implementation

@override
S addAll(Iterable<E> events) {
  final sb = snapshot.toBuilder();
  for (final e in events) {
    _tree.add(e);
    sb.update(
        e.applyTo as void Function(EventSourcedSnapshotBuilder<S, B, E>));
  }
  return _snapshot = sb.build();
}