Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }