Example #1
0
        protected virtual IShipmentTypeStateMergePatched Map(IMergePatchShipmentType c)
        {
            var stateEventId = new ShipmentTypeEventId(c.ShipmentTypeId, c.Version);
            IShipmentTypeStateMergePatched e = NewShipmentTypeStateMergePatched(stateEventId);

            e.ParentTypeId = c.ParentTypeId;
            e.HasTable     = c.HasTable;
            e.Description  = c.Description;
            e.Active       = c.Active;
            e.IsPropertyParentTypeIdRemoved = c.IsPropertyParentTypeIdRemoved;
            e.IsPropertyHasTableRemoved     = c.IsPropertyHasTableRemoved;
            e.IsPropertyDescriptionRemoved  = c.IsPropertyDescriptionRemoved;
            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);
        }
Example #2
0
        protected ShipmentTypeStateMergePatched NewShipmentTypeStateMergePatched(long version, string commandId, string requesterId)
        {
            var stateEventId = new ShipmentTypeEventId(_state.ShipmentTypeId, version);
            var e            = NewShipmentTypeStateMergePatched(stateEventId);

            e.CommandId = commandId;

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

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

            ShipmentTypeEventId other = obj as ShipmentTypeEventId;

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

            return(true &&
                   Object.Equals(this.ShipmentTypeId, other.ShipmentTypeId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Example #4
0
 protected ShipmentTypeStateEventDtoBase(ShipmentTypeEventId stateEventId)
 {
     this.ShipmentTypeEventId = stateEventId;
 }
Example #5
0
 public ShipmentTypeStateMergePatched(ShipmentTypeEventId stateEventId) : base(stateEventId)
 {
 }
Example #6
0
 public ShipmentTypeStateCreated(ShipmentTypeEventId stateEventId) : base(stateEventId)
 {
 }
Example #7
0
 protected ShipmentTypeStateEventBase(ShipmentTypeEventId stateEventId) : base(stateEventId)
 {
 }
Example #8
0
 private ShipmentTypeStateMergePatched NewShipmentTypeStateMergePatched(ShipmentTypeEventId stateEventId)
 {
     return(new ShipmentTypeStateMergePatched(stateEventId));
 }
Example #9
0
////////////////////////

        private ShipmentTypeStateCreated NewShipmentTypeStateCreated(ShipmentTypeEventId stateEventId)
        {
            return(new ShipmentTypeStateCreated(stateEventId));
        }