public void UpdatePayload(string payload) { var evt = new ProcessFilePayloadUpdatedEvent(Guid.NewGuid().ToString(), AggregateId, Version, payload, DateTime.UtcNow); Handle(evt); DomainEvents.Add(evt); }
private void Handle(ProcessFilePayloadUpdatedEvent evt) { try { BPMNParser.Parse(evt.Payload); } catch { throw new AggregateValidationException(new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("validation", Global.BPMNFileNotValid) }); } Payload = evt.Payload; UpdateDateTime = evt.UpdateDateTime; }