コード例 #1
0
ファイル: LocatorAggregate.cs プロジェクト: zhoufoxcn/wms-2
        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);
        }
コード例 #2
0
        public virtual LocatorStateEventId ToLocatorStateEventId()
        {
            LocatorStateEventId v = new LocatorStateEventId();

            v.LocatorId = this.LocatorId;
            v.Version   = this.Version;
            return(v);
        }
コード例 #3
0
 public LocatorStateEventIdDtoWrapper(LocatorStateEventId val)
 {
     if (val == null)
     {
         throw new ArgumentNullException("val");
     }
     this._value = val;
 }
コード例 #4
0
ファイル: LocatorAggregate.cs プロジェクト: zhoufoxcn/wms-2
        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);
        }
コード例 #5
0
ファイル: LocatorAggregate.cs プロジェクト: zhoufoxcn/wms-2
        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);
        }
コード例 #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)
                   );
        }
コード例 #7
0
ファイル: LocatorAggregate.cs プロジェクト: zhoufoxcn/wms-2
        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);
        }
コード例 #8
0
ファイル: LocatorStateEvent.cs プロジェクト: zhoufoxcn/wms-2
 public LocatorStateDeleted(LocatorStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #9
0
ファイル: LocatorStateEvent.cs プロジェクト: zhoufoxcn/wms-2
 public LocatorStateMergePatched(LocatorStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #10
0
ファイル: LocatorStateEvent.cs プロジェクト: zhoufoxcn/wms-2
 public LocatorStateCreated(LocatorStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #11
0
ファイル: LocatorStateEvent.cs プロジェクト: zhoufoxcn/wms-2
 protected LocatorStateEventBase(LocatorStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
コード例 #12
0
 public LocatorStateEventIdFlattenedDto(LocatorStateEventId val)
 {
     this._value = new LocatorStateEventIdDtoWrapper(val);
 }
コード例 #13
0
ファイル: LocatorAggregate.cs プロジェクト: zhoufoxcn/wms-2
 private LocatorStateDeleted NewLocatorStateDeleted(LocatorStateEventId stateEventId)
 {
     return(new LocatorStateDeleted(stateEventId));
 }
コード例 #14
0
ファイル: LocatorAggregate.cs プロジェクト: zhoufoxcn/wms-2
 private LocatorStateMergePatched NewLocatorStateMergePatched(LocatorStateEventId stateEventId)
 {
     return(new LocatorStateMergePatched(stateEventId));
 }