public virtual void When(IShipmentImageStateRemoved e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
}// END Map(IMergePatch... //////////////////////////// protected virtual IShipmentImageStateRemoved MapRemove(IRemoveShipmentImage c, IShipmentCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new ShipmentImageEventId(c.ShipmentId, c.SequenceId, version); IShipmentImageStateRemoved e = NewShipmentImageStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
public virtual ShipmentImageStateRemovedDto ToShipmentImageStateRemovedDto(IShipmentImageStateRemoved e) { var dto = new ShipmentImageStateRemovedDto(); dto.ShipmentImageEventId = e.ShipmentImageEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.Version = e.Version; dto.CommandId = e.CommandId; return(dto); }
public void AddShipmentImageEvent(IShipmentImageStateRemoved e) { _innerStateEvents.Add((ShipmentImageStateRemovedDto)e); }
void IShipmentImageState.When(IShipmentImageStateRemoved e) { throw new NotSupportedException(); }