Beispiel #1
0
        protected virtual ILocatorStateCreated Map(ICreateLocator c)
        {
            var stateEventId       = new LocatorEventId(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.Description   = c.Description;
            e.LocatorTypeId = c.LocatorTypeId;
            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);
        }
Beispiel #2
0
        protected LocatorStateDeleted NewLocatorStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new LocatorEventId(_state.LocatorId, version);
            var e            = NewLocatorStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Beispiel #3
0
        protected virtual ILocatorStateDeleted Map(IDeleteLocator c)
        {
            var stateEventId       = new LocatorEventId(c.LocatorId, c.Version);
            ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            LocatorEventId other = obj as LocatorEventId;

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

            return(true &&
                   Object.Equals(this.LocatorId, other.LocatorId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Beispiel #5
0
 private LocatorStateDeleted NewLocatorStateDeleted(LocatorEventId stateEventId)
 {
     return(new LocatorStateDeleted(stateEventId));
 }
Beispiel #6
0
 private LocatorStateMergePatched NewLocatorStateMergePatched(LocatorEventId stateEventId)
 {
     return(new LocatorStateMergePatched(stateEventId));
 }
Beispiel #7
0
 protected LocatorStateEventDtoBase(LocatorEventId stateEventId)
 {
     this.LocatorEventId = stateEventId;
 }
Beispiel #8
0
 public LocatorStateDeleted(LocatorEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #9
0
 public LocatorStateMergePatched(LocatorEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #10
0
 public LocatorStateCreated(LocatorEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #11
0
 protected LocatorStateEventBase(LocatorEventId stateEventId) : base(stateEventId)
 {
 }