Beispiel #1
0
        protected MovementTypeStateDeleted NewMovementTypeStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new MovementTypeEventId(_state.MovementTypeId, version);
            var e            = NewMovementTypeStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Beispiel #2
0
        protected virtual IMovementTypeStateDeleted Map(IDeleteMovementType c)
        {
            var stateEventId            = new MovementTypeEventId(c.MovementTypeId, c.Version);
            IMovementTypeStateDeleted e = NewMovementTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            MovementTypeEventId other = obj as MovementTypeEventId;

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

            return(true &&
                   Object.Equals(this.MovementTypeId, other.MovementTypeId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Beispiel #4
0
        protected virtual IMovementTypeStateMergePatched Map(IMergePatchMovementType c)
        {
            var stateEventId = new MovementTypeEventId(c.MovementTypeId, c.Version);
            IMovementTypeStateMergePatched e = NewMovementTypeStateMergePatched(stateEventId);

            e.Description = c.Description;
            e.Active      = c.Active;
            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);
        }
Beispiel #5
0
 protected MovementTypeStateEventDtoBase(MovementTypeEventId stateEventId)
 {
     this.MovementTypeEventId = stateEventId;
 }
Beispiel #6
0
 public MovementTypeStateDeleted(MovementTypeEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #7
0
 public MovementTypeStateMergePatched(MovementTypeEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #8
0
 protected MovementTypeStateEventBase(MovementTypeEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #9
0
 private MovementTypeStateDeleted NewMovementTypeStateDeleted(MovementTypeEventId stateEventId)
 {
     return(new MovementTypeStateDeleted(stateEventId));
 }
Beispiel #10
0
 private MovementTypeStateMergePatched NewMovementTypeStateMergePatched(MovementTypeEventId stateEventId)
 {
     return(new MovementTypeStateMergePatched(stateEventId));
 }