Example #1
0
        private ShipmentPackageContentEventId NewShipmentPackageContentEventId(string shipmentItemSeqId)
        {
            var eId = new ShipmentPackageContentEventId();

            eId.ShipmentPackageId      = this.ShipmentPackageEventId.ShipmentPackageId;
            eId.ShipmentItemSeqId      = shipmentItemSeqId;
            eId.ShipmentPackageVersion = this.ShipmentPackageEventId.Version;
            return(eId);
        }
Example #2
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IShipmentPackageContentStateRemoved MapRemove(IRemoveShipmentPackageContent c, IShipmentPackageCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new ShipmentPackageContentEventId(c.ShipmentPackageId, c.ShipmentItemSeqId, version);
            IShipmentPackageContentStateRemoved e = NewShipmentPackageContentStateRemoved(stateEventId);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }// END Map(IRemove... ////////////////////////////
Example #3
0
        protected virtual IShipmentPackageContentStateCreated MapCreate(ICreateShipmentPackageContent c, IShipmentPackageCommand outerCommand, long version, IShipmentPackageState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new ShipmentPackageContentEventId(c.ShipmentPackageId, c.ShipmentItemSeqId, version);
            IShipmentPackageContentStateCreated e = NewShipmentPackageContentStateCreated(stateEventId);
            var s = outerState.ShipmentPackageContents.Get(c.ShipmentItemSeqId, true);

            e.Quantity           = c.Quantity;
            e.SubProductId       = c.SubProductId;
            e.SubProductQuantity = c.SubProductQuantity;
            e.Active             = c.Active;

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

            ShipmentPackageContentEventId other = obj as ShipmentPackageContentEventId;

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

            return(true &&
                   Object.Equals(this.ShipmentPackageId, other.ShipmentPackageId) &&
                   Object.Equals(this.ShipmentItemSeqId, other.ShipmentItemSeqId) &&
                   Object.Equals(this.ShipmentPackageVersion, other.ShipmentPackageVersion)
                   );
        }
Example #5
0
        protected ShipmentPackageContentEventId NewShipmentPackageContentEventId(string shipmentItemSeqId)
        {
            var stateEventId = new ShipmentPackageContentEventId(this.ShipmentPackageEventId.ShipmentPackageId, shipmentItemSeqId, this.ShipmentPackageEventId.Version);

            return(stateEventId);
        }
Example #6
0
 protected ShipmentPackageContentStateEventDtoBase(ShipmentPackageContentEventId stateEventId)
 {
     this.ShipmentPackageContentEventId = stateEventId;
 }
Example #7
0
 public ShipmentPackageContentStateRemoved(ShipmentPackageContentEventId stateEventId) : base(stateEventId)
 {
 }
Example #8
0
 public ShipmentPackageContentStateMergePatched(ShipmentPackageContentEventId stateEventId) : base(stateEventId)
 {
 }
Example #9
0
 protected ShipmentPackageContentStateEventBase(ShipmentPackageContentEventId stateEventId) : base(stateEventId)
 {
 }
Example #10
0
 private ShipmentPackageContentStateRemoved NewShipmentPackageContentStateRemoved(ShipmentPackageContentEventId stateEventId)
 {
     return(new ShipmentPackageContentStateRemoved(stateEventId));
 }
Example #11
0
 private ShipmentPackageContentStateMergePatched NewShipmentPackageContentStateMergePatched(ShipmentPackageContentEventId stateEventId)
 {
     return(new ShipmentPackageContentStateMergePatched(stateEventId));
 }