private DomainEventStreamMessage ConvertToDomainEventStream(EventStreamMessage message) { var domainEventStreamMessage = new DomainEventStreamMessage( message.CommandId, message.AggregateRootId, message.Version, message.AggregateRootTypeName, _eventSerializer.Deserialize<IDomainEvent>(message.Events), message.Items); domainEventStreamMessage.Timestamp = message.Timestamp; return domainEventStreamMessage; }
private DomainEventStreamMessage ConvertToDomainEventStream(EventStreamMessage message) { var domainEventStreamMessage = new DomainEventStreamMessage( message.CommandId, message.AggregateRootId, message.Version, message.AggregateRootTypeName, _eventSerializer.Deserialize <IDomainEvent>(message.Events), message.Items); domainEventStreamMessage.Timestamp = message.Timestamp; return(domainEventStreamMessage); }
private EventStreamMessage CreateEventMessage(DomainEventStreamMessage eventStream) { var message = new EventStreamMessage(); message.CommandId = eventStream.CommandId; message.AggregateRootTypeCode = eventStream.AggregateRootTypeCode; message.AggregateRootId = eventStream.AggregateRootId; message.Timestamp = eventStream.Timestamp; message.Version = eventStream.Version; message.Events = _eventSerializer.Serialize(eventStream.Events); message.Items = eventStream.Items; return(message); }
private EventStreamMessage CreateEventMessage(DomainEventStreamMessage eventStream) { var message = new EventStreamMessage { Id = eventStream.Id, CommandId = eventStream.CommandId, AggregateRootTypeName = eventStream.AggregateRootTypeName, AggregateRootId = eventStream.AggregateRootId, Timestamp = eventStream.Timestamp, Version = eventStream.Version, Events = _eventSerializer.Serialize(eventStream.Events), Items = eventStream.Items }; return(message); }