Пример #1
0
        public virtual void When(IShipmentImageStateRemoved e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Пример #2
0
        }// 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... ////////////////////////////
Пример #3
0
        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);
        }
Пример #4
0
 public void AddShipmentImageEvent(IShipmentImageStateRemoved e)
 {
     _innerStateEvents.Add((ShipmentImageStateRemovedDto)e);
 }
Пример #5
0
 void IShipmentImageState.When(IShipmentImageStateRemoved e)
 {
     throw new NotSupportedException();
 }