public virtual void When(IShipmentReceiptImageStateRemoved e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
}// END Map(IMergePatch... //////////////////////////// protected virtual IShipmentReceiptImageStateRemoved MapRemove(IRemoveShipmentReceiptImage c, IShipmentReceiptCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new ShipmentReceiptImageEventId(c.ShipmentId, c.ShipmentReceiptReceiptSeqId, c.SequenceId, version); IShipmentReceiptImageStateRemoved e = NewShipmentReceiptImageStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
void IShipmentReceiptImageState.When(IShipmentReceiptImageStateRemoved e) { throw new NotSupportedException(); }
public void AddShipmentReceiptImageEvent(IShipmentReceiptImageStateRemoved e) { _innerStateEvents.Add((ShipmentReceiptImageStateRemovedDto)e); }
public virtual ShipmentReceiptImageStateRemovedDto ToShipmentReceiptImageStateRemovedDto(IShipmentReceiptImageStateRemoved e) { var dto = new ShipmentReceiptImageStateRemovedDto(); dto.ShipmentReceiptImageEventId = e.ShipmentReceiptImageEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.Version = e.Version; dto.CommandId = e.CommandId; return(dto); }