public virtual void When(IPartyRoleStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
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); }
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); }
public virtual void Delete(IDeletePartyRole c) { IPartyRoleStateDeleted e = Map(c); Apply(e); }
public void AddPartyRoleEvent(IPartyRoleStateDeleted e) { _innerStateEvents.Add((PartyRoleStateDeletedDto)e); }
void IPartyRoleState.When(IPartyRoleStateDeleted e) { throw new NotSupportedException(); }