コード例 #1
0
        protected virtual IWarehouseStateMergePatched Map(IMergePatchWarehouse c)
        {
            var stateEventId = new WarehouseEventId(c.WarehouseId, c.Version);
            IWarehouseStateMergePatched e = NewWarehouseStateMergePatched(stateEventId);

            e.WarehouseName = c.WarehouseName;
            e.Description   = c.Description;
            e.IsInTransit   = c.IsInTransit;
            e.Active        = c.Active;
            e.IsPropertyWarehouseNameRemoved = c.IsPropertyWarehouseNameRemoved;
            e.IsPropertyDescriptionRemoved   = c.IsPropertyDescriptionRemoved;
            e.IsPropertyIsInTransitRemoved   = c.IsPropertyIsInTransitRemoved;
            e.IsPropertyActiveRemoved        = c.IsPropertyActiveRemoved;

            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 WarehouseStateDeleted NewWarehouseStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new WarehouseEventId(_state.WarehouseId, version);
            var e            = NewWarehouseStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
コード例 #3
0
        protected virtual IWarehouseStateDeleted Map(IDeleteWarehouse c)
        {
            var stateEventId         = new WarehouseEventId(c.WarehouseId, c.Version);
            IWarehouseStateDeleted e = NewWarehouseStateDeleted(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);
            }

            WarehouseEventId other = obj as WarehouseEventId;

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

            return(true &&
                   Object.Equals(this.WarehouseId, other.WarehouseId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
コード例 #5
0
 protected WarehouseStateEventDtoBase(WarehouseEventId stateEventId)
 {
     this.WarehouseEventId = stateEventId;
 }
コード例 #6
0
 private WarehouseStateDeleted NewWarehouseStateDeleted(WarehouseEventId stateEventId)
 {
     return(new WarehouseStateDeleted(stateEventId));
 }
コード例 #7
0
 private WarehouseStateMergePatched NewWarehouseStateMergePatched(WarehouseEventId stateEventId)
 {
     return(new WarehouseStateMergePatched(stateEventId));
 }
コード例 #8
0
ファイル: WarehouseEvent.cs プロジェクト: uwitec/wms-8
 public WarehouseStateDeleted(WarehouseEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #9
0
ファイル: WarehouseEvent.cs プロジェクト: uwitec/wms-8
 public WarehouseStateMergePatched(WarehouseEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #10
0
ファイル: WarehouseEvent.cs プロジェクト: uwitec/wms-8
 protected WarehouseStateEventBase(WarehouseEventId stateEventId) : base(stateEventId)
 {
 }