Ejemplo n.º 1
0
        protected virtual ILocatorStateMergePatched Map(IMergePatchLocator c)
        {
            var stateEventId            = new LocatorStateEventId(c.LocatorId, c.Version);
            ILocatorStateMergePatched e = NewLocatorStateMergePatched(stateEventId);

            e.WarehouseId     = c.WarehouseId;
            e.ParentLocatorId = c.ParentLocatorId;
            e.LocatorType     = c.LocatorType;
            e.PriorityNumber  = c.PriorityNumber;
            e.IsDefault       = c.IsDefault;
            e.X      = c.X;
            e.Y      = c.Y;
            e.Z      = c.Z;
            e.Active = c.Active;
            e.IsPropertyWarehouseIdRemoved     = c.IsPropertyWarehouseIdRemoved;
            e.IsPropertyParentLocatorIdRemoved = c.IsPropertyParentLocatorIdRemoved;
            e.IsPropertyLocatorTypeRemoved     = c.IsPropertyLocatorTypeRemoved;
            e.IsPropertyPriorityNumberRemoved  = c.IsPropertyPriorityNumberRemoved;
            e.IsPropertyIsDefaultRemoved       = c.IsPropertyIsDefaultRemoved;
            e.IsPropertyXRemoved      = c.IsPropertyXRemoved;
            e.IsPropertyYRemoved      = c.IsPropertyYRemoved;
            e.IsPropertyZRemoved      = c.IsPropertyZRemoved;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;

            var version = c.Version;


            return(e);
        }
Ejemplo n.º 2
0
        public virtual LocatorStateEventId ToLocatorStateEventId()
        {
            LocatorStateEventId v = new LocatorStateEventId();

            v.LocatorId = this.LocatorId;
            v.Version   = this.Version;
            return(v);
        }
Ejemplo n.º 3
0
 public LocatorStateEventIdDtoWrapper(LocatorStateEventId val)
 {
     if (val == null)
     {
         throw new ArgumentNullException("val");
     }
     this._value = val;
 }
Ejemplo n.º 4
0
        protected LocatorStateDeleted NewLocatorStateDeleted(string commandId, string requesterId)
        {
            var stateEventId = new LocatorStateEventId(_state.LocatorId, ((ILocatorStateProperties)_state).Version);
            var e            = NewLocatorStateDeleted(stateEventId);

            e.CommandId = commandId;

            e.CreatedBy = (string)requesterId;
            e.CreatedAt = DateTime.Now;

            return(e);
        }
Ejemplo n.º 5
0
        protected virtual ILocatorStateDeleted Map(IDeleteLocator c)
        {
            var stateEventId       = new LocatorStateEventId(c.LocatorId, c.Version);
            ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;


            return(e);
        }
Ejemplo n.º 6
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            LocatorStateEventId other = obj as LocatorStateEventId;

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

            return(true &&
                   Object.Equals(this.LocatorId, other.LocatorId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Ejemplo n.º 7
0
        protected virtual ILocatorStateCreated Map(ICreateLocator c)
        {
            var stateEventId       = new LocatorStateEventId(c.LocatorId, c.Version);
            ILocatorStateCreated e = NewLocatorStateCreated(stateEventId);

            e.WarehouseId     = c.WarehouseId;
            e.ParentLocatorId = c.ParentLocatorId;
            e.LocatorType     = c.LocatorType;
            e.PriorityNumber  = c.PriorityNumber;
            e.IsDefault       = c.IsDefault;
            e.X         = c.X;
            e.Y         = c.Y;
            e.Z         = c.Z;
            e.Active    = c.Active;
            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            var version = c.Version;


            return(e);
        }
Ejemplo n.º 8
0
 public LocatorStateDeleted(LocatorStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 9
0
 public LocatorStateMergePatched(LocatorStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 10
0
 public LocatorStateCreated(LocatorStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 11
0
 protected LocatorStateEventBase(LocatorStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
 public LocatorStateEventIdFlattenedDto(LocatorStateEventId val)
 {
     this._value = new LocatorStateEventIdDtoWrapper(val);
 }
Ejemplo n.º 13
0
 private LocatorStateDeleted NewLocatorStateDeleted(LocatorStateEventId stateEventId)
 {
     return(new LocatorStateDeleted(stateEventId));
 }
Ejemplo n.º 14
0
 private LocatorStateMergePatched NewLocatorStateMergePatched(LocatorStateEventId stateEventId)
 {
     return(new LocatorStateMergePatched(stateEventId));
 }