Пример #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);
        }
Пример #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);
        }
Пример #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)
                   );
        }
Пример #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);
        }
Пример #5
0
 protected MovementTypeStateEventDtoBase(MovementTypeEventId stateEventId)
 {
     this.MovementTypeEventId = stateEventId;
 }
Пример #6
0
 public MovementTypeStateDeleted(MovementTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #7
0
 public MovementTypeStateMergePatched(MovementTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #8
0
 protected MovementTypeStateEventBase(MovementTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #9
0
 private MovementTypeStateDeleted NewMovementTypeStateDeleted(MovementTypeEventId stateEventId)
 {
     return(new MovementTypeStateDeleted(stateEventId));
 }
Пример #10
0
 private MovementTypeStateMergePatched NewMovementTypeStateMergePatched(MovementTypeEventId stateEventId)
 {
     return(new MovementTypeStateMergePatched(stateEventId));
 }