Exemple #1
0
        public virtual void When(IRejectionReasonStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Exemple #2
0
        protected virtual IRejectionReasonStateDeleted Map(IDeleteRejectionReason c)
        {
            var stateEventId = new RejectionReasonEventId(c.RejectionReasonId, c.Version);
            IRejectionReasonStateDeleted e = NewRejectionReasonStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Exemple #3
0
        public virtual void Delete(IDeleteRejectionReason c)
        {
            IRejectionReasonStateDeleted e = Map(c);

            Apply(e);
        }
        public virtual RejectionReasonStateDeletedDto ToRejectionReasonStateDeletedDto(IRejectionReasonStateDeleted e)
        {
            var dto = new RejectionReasonStateDeletedDto();

            dto.RejectionReasonEventId = e.RejectionReasonEventId;
            dto.CreatedAt = e.CreatedAt;
            dto.CreatedBy = e.CreatedBy;
            dto.CommandId = e.CommandId;

            return(dto);
        }
 public void AddRejectionReasonEvent(IRejectionReasonStateDeleted e)
 {
     _innerStateEvents.Add((RejectionReasonStateDeletedDto)e);
 }
Exemple #6
0
 void IRejectionReasonState.When(IRejectionReasonStateDeleted e)
 {
     throw new NotSupportedException();
 }