Exemplo n.º 1
0
        private ShipmentImageEventId NewShipmentImageEventId(string sequenceId)
        {
            var eId = new ShipmentImageEventId();

            eId.ShipmentId      = this.ShipmentEventId.ShipmentId;
            eId.SequenceId      = sequenceId;
            eId.ShipmentVersion = this.ShipmentEventId.Version;
            return(eId);
        }
Exemplo n.º 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... ////////////////////////////
Exemplo n.º 3
0
        protected virtual IShipmentImageStateCreated MapCreate(ICreateShipmentImage c, IShipmentCommand outerCommand, long version, IShipmentState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId             = new ShipmentImageEventId(c.ShipmentId, c.SequenceId, version);
            IShipmentImageStateCreated e = NewShipmentImageStateCreated(stateEventId);
            var s = outerState.ShipmentImages.Get(c.SequenceId, true);

            e.Url    = c.Url;
            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            ShipmentImageEventId other = obj as ShipmentImageEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.ShipmentId, other.ShipmentId) &&
                   Object.Equals(this.SequenceId, other.SequenceId) &&
                   Object.Equals(this.ShipmentVersion, other.ShipmentVersion)
                   );
        }
Exemplo n.º 5
0
 private ShipmentImageStateRemoved NewShipmentImageStateRemoved(ShipmentImageEventId stateEventId)
 {
     return(new ShipmentImageStateRemoved(stateEventId));
 }
Exemplo n.º 6
0
 private ShipmentImageStateMergePatched NewShipmentImageStateMergePatched(ShipmentImageEventId stateEventId)
 {
     return(new ShipmentImageStateMergePatched(stateEventId));
 }
Exemplo n.º 7
0
 protected ShipmentImageStateEventDtoBase(ShipmentImageEventId stateEventId)
 {
     this.ShipmentImageEventId = stateEventId;
 }
Exemplo n.º 8
0
        protected ShipmentImageEventId NewShipmentImageEventId(string sequenceId)
        {
            var stateEventId = new ShipmentImageEventId(this.ShipmentEventId.ShipmentId, sequenceId, this.ShipmentEventId.Version);

            return(stateEventId);
        }
Exemplo n.º 9
0
 public ShipmentImageStateRemoved(ShipmentImageEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 10
0
 public ShipmentImageStateMergePatched(ShipmentImageEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 11
0
 public ShipmentImageStateCreated(ShipmentImageEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 12
0
 protected ShipmentImageStateEventBase(ShipmentImageEventId stateEventId) : base(stateEventId)
 {
 }