예제 #1
0
        protected virtual IFacilityStateCreated Map(ICreateFacility c)
        {
            var stateEventId        = new FacilityEventId(c.FacilityId, c.Version);
            IFacilityStateCreated e = NewFacilityStateCreated(stateEventId);

            e.FacilityTypeId             = c.FacilityTypeId;
            e.ParentFacilityId           = c.ParentFacilityId;
            e.OwnerPartyId               = c.OwnerPartyId;
            e.DefaultInventoryItemTypeId = c.DefaultInventoryItemTypeId;
            e.FacilityName               = c.FacilityName;
            e.PrimaryFacilityGroupId     = c.PrimaryFacilityGroupId;
            e.OldSquareFootage           = c.OldSquareFootage;
            e.FacilitySize               = c.FacilitySize;
            e.FacilitySizeUomId          = c.FacilitySizeUomId;
            e.ProductStoreId             = c.ProductStoreId;
            e.DefaultDaysToShip          = c.DefaultDaysToShip;
            e.OpenedDate            = c.OpenedDate;
            e.ClosedDate            = c.ClosedDate;
            e.Description           = c.Description;
            e.DefaultDimensionUomId = c.DefaultDimensionUomId;
            e.DefaultWeightUomId    = c.DefaultWeightUomId;
            e.GeoPointId            = c.GeoPointId;
            e.Active    = c.Active;
            e.CommandId = c.CommandId;


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


            return(e);
        }
예제 #2
0
        protected FacilityStateDeleted NewFacilityStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new FacilityEventId(_state.FacilityId, version);
            var e            = NewFacilityStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
예제 #3
0
        protected virtual IFacilityStateDeleted Map(IDeleteFacility c)
        {
            var stateEventId        = new FacilityEventId(c.FacilityId, c.Version);
            IFacilityStateDeleted e = NewFacilityStateDeleted(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);
            }

            FacilityEventId other = obj as FacilityEventId;

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

            return(true &&
                   Object.Equals(this.FacilityId, other.FacilityId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
예제 #5
0
 protected FacilityStateEventDtoBase(FacilityEventId stateEventId)
 {
     this.FacilityEventId = stateEventId;
 }
예제 #6
0
 private FacilityStateDeleted NewFacilityStateDeleted(FacilityEventId stateEventId)
 {
     return(new FacilityStateDeleted(stateEventId));
 }
예제 #7
0
 private FacilityStateMergePatched NewFacilityStateMergePatched(FacilityEventId stateEventId)
 {
     return(new FacilityStateMergePatched(stateEventId));
 }
예제 #8
0
 public FacilityStateDeleted(FacilityEventId stateEventId) : base(stateEventId)
 {
 }
예제 #9
0
 public FacilityStateMergePatched(FacilityEventId stateEventId) : base(stateEventId)
 {
 }
예제 #10
0
 protected FacilityStateEventBase(FacilityEventId stateEventId) : base(stateEventId)
 {
 }