public static EventDescriptor Create(Guid id, Event @event) { return new EventDescriptor() { Id = id, Message = SerializationHelper.Serialize(@event), MessageType = @event.GetType().AssemblyQualifiedName, Version = @event.Version }; }
public void Add(Guid id, Event @event) { LatestVersion = @event.Version; Items.Add(EventDescriptor.Create(id, @event)); }