public void WriteEventAsync(EventTransactionModel <TStateKey> model) { if (model == null) { throw new ArgumentNullException("WriteEventAsync event cannot be empty"); } transactionEvents.Add(model); this.State.Player(model.Event); }
public void WriteEventAsync(IEvent <TStateKey> @event, MQPublishType publishType = MQPublishType.Asynchronous) { if (@event == null) { throw new ArgumentNullException("WriteEventAsync event cannot be empty"); } @event.Version = State.NextVersion(); @event.StateId = State.StateId; var model = new EventTransactionModel <TStateKey>(@event, publishType); this.WriteEventAsync(model); }