protected virtual IShipmentPackageContentMvoStateCreated Map(ICreateShipmentPackageContentMvo c)
        {
            var stateEventId = new ShipmentPackageContentMvoEventId(c.ShipmentPackageContentId, c.ShipmentPackageVersion);
            IShipmentPackageContentMvoStateCreated e = NewShipmentPackageContentMvoStateCreated(stateEventId);

            e.Quantity           = c.Quantity;
            e.SubProductId       = c.SubProductId;
            e.SubProductQuantity = c.SubProductQuantity;
            e.Version            = c.Version;
            e.Active             = c.Active;
            e.ShipmentPackageShipmentBoxTypeId = c.ShipmentPackageShipmentBoxTypeId;
            e.ShipmentPackageDateCreated       = c.ShipmentPackageDateCreated;
            e.ShipmentPackageBoxLength         = c.ShipmentPackageBoxLength;
            e.ShipmentPackageBoxHeight         = c.ShipmentPackageBoxHeight;
            e.ShipmentPackageBoxWidth          = c.ShipmentPackageBoxWidth;
            e.ShipmentPackageDimensionUomId    = c.ShipmentPackageDimensionUomId;
            e.ShipmentPackageWeight            = c.ShipmentPackageWeight;
            e.ShipmentPackageWeightUomId       = c.ShipmentPackageWeightUomId;
            e.ShipmentPackageInsuredValue      = c.ShipmentPackageInsuredValue;
            e.ShipmentPackageCreatedBy         = c.ShipmentPackageCreatedBy;
            e.ShipmentPackageCreatedAt         = c.ShipmentPackageCreatedAt;
            e.ShipmentPackageUpdatedBy         = c.ShipmentPackageUpdatedBy;
            e.ShipmentPackageUpdatedAt         = c.ShipmentPackageUpdatedAt;
            e.ShipmentPackageActive            = c.ShipmentPackageActive;
            e.ShipmentPackageDeleted           = c.ShipmentPackageDeleted;
            e.CommandId = c.CommandId;


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


            return(e);
        }
        protected ShipmentPackageContentMvoStateDeleted NewShipmentPackageContentMvoStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new ShipmentPackageContentMvoEventId(_state.ShipmentPackageContentId, version);
            var e            = NewShipmentPackageContentMvoStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
        protected virtual IShipmentPackageContentMvoStateDeleted Map(IDeleteShipmentPackageContentMvo c)
        {
            var stateEventId = new ShipmentPackageContentMvoEventId(c.ShipmentPackageContentId, c.ShipmentPackageVersion);
            IShipmentPackageContentMvoStateDeleted e = NewShipmentPackageContentMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
예제 #4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            ShipmentPackageContentMvoEventId other = obj as ShipmentPackageContentMvoEventId;

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

            return(true &&
                   Object.Equals(this.ShipmentPackageContentId, other.ShipmentPackageContentId) &&
                   Object.Equals(this.ShipmentPackageVersion, other.ShipmentPackageVersion)
                   );
        }
예제 #5
0
 protected ShipmentPackageContentMvoStateEventDtoBase(ShipmentPackageContentMvoEventId stateEventId)
 {
     this.ShipmentPackageContentMvoEventId = stateEventId;
 }
 private ShipmentPackageContentMvoStateDeleted NewShipmentPackageContentMvoStateDeleted(ShipmentPackageContentMvoEventId stateEventId)
 {
     return(new ShipmentPackageContentMvoStateDeleted(stateEventId));
 }
 private ShipmentPackageContentMvoStateMergePatched NewShipmentPackageContentMvoStateMergePatched(ShipmentPackageContentMvoEventId stateEventId)
 {
     return(new ShipmentPackageContentMvoStateMergePatched(stateEventId));
 }
 public ShipmentPackageContentMvoStateDeleted(ShipmentPackageContentMvoEventId stateEventId) : base(stateEventId)
 {
 }
 public ShipmentPackageContentMvoStateMergePatched(ShipmentPackageContentMvoEventId stateEventId) : base(stateEventId)
 {
 }
예제 #10
0
 protected ShipmentPackageContentMvoStateEventBase(ShipmentPackageContentMvoEventId stateEventId) : base(stateEventId)
 {
 }