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

            e.Name                         = c.Name;
            e.Description                  = c.Description;
            e.IsInTransit                  = c.IsInTransit;
            e.Active                       = c.Active;
            e.IsPropertyNameRemoved        = c.IsPropertyNameRemoved;
            e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved;
            e.IsPropertyIsInTransitRemoved = c.IsPropertyIsInTransitRemoved;
            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 WarehouseStateEventId ToWarehouseStateEventId()
        {
            WarehouseStateEventId v = new WarehouseStateEventId();

            v.WarehouseId = this.WarehouseId;
            v.Version     = this.Version;
            return(v);
        }
コード例 #3
0
 public WarehouseStateEventIdDtoWrapper(WarehouseStateEventId val)
 {
     if (val == null)
     {
         throw new ArgumentNullException("val");
     }
     this._value = val;
 }
コード例 #4
0
        protected WarehouseStateDeleted NewWarehouseStateDeleted(string commandId, string requesterId)
        {
            var stateEventId = new WarehouseStateEventId(_state.WarehouseId, ((IWarehouseStateProperties)_state).Version);
            var e            = NewWarehouseStateDeleted(stateEventId);

            e.CommandId = commandId;

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

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

            WarehouseStateEventId other = obj as WarehouseStateEventId;

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

            return(true &&
                   Object.Equals(this.WarehouseId, other.WarehouseId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
コード例 #7
0
 public WarehouseStateEventIdFlattenedDto(WarehouseStateEventId val)
 {
     this._value = new WarehouseStateEventIdDtoWrapper(val);
 }
コード例 #8
0
 private WarehouseStateDeleted NewWarehouseStateDeleted(WarehouseStateEventId stateEventId)
 {
     return(new WarehouseStateDeleted(stateEventId));
 }
コード例 #9
0
 private WarehouseStateMergePatched NewWarehouseStateMergePatched(WarehouseStateEventId stateEventId)
 {
     return(new WarehouseStateMergePatched(stateEventId));
 }
コード例 #10
0
 protected WarehouseStateEventBase(WarehouseStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
コード例 #11
0
 public WarehouseStateDeleted(WarehouseStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #12
0
 public WarehouseStateMergePatched(WarehouseStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #13
0
 public WarehouseStateCreated(WarehouseStateEventId stateEventId) : base(stateEventId)
 {
 }