Пример #1
0
        public virtual void When(IPartyRoleStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Пример #2
0
        public virtual PartyRoleStateDeletedDto ToPartyRoleStateDeletedDto(IPartyRoleStateDeleted e)
        {
            var dto = new PartyRoleStateDeletedDto();

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

            return(dto);
        }
Пример #3
0
        protected virtual IPartyRoleStateDeleted Map(IDeletePartyRole c)
        {
            var stateEventId         = new PartyRoleEventId(c.PartyRoleId, c.Version);
            IPartyRoleStateDeleted e = NewPartyRoleStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Пример #4
0
        public virtual void Delete(IDeletePartyRole c)
        {
            IPartyRoleStateDeleted e = Map(c);

            Apply(e);
        }
Пример #5
0
 public void AddPartyRoleEvent(IPartyRoleStateDeleted e)
 {
     _innerStateEvents.Add((PartyRoleStateDeletedDto)e);
 }
Пример #6
0
 void IPartyRoleState.When(IPartyRoleStateDeleted e)
 {
     throw new NotSupportedException();
 }