public virtual void When(IDocumentTypeStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
public virtual DocumentTypeStateDeletedDto ToDocumentTypeStateDeletedDto(IDocumentTypeStateDeleted e) { var dto = new DocumentTypeStateDeletedDto(); dto.DocumentTypeEventId = e.DocumentTypeEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
protected virtual IDocumentTypeStateDeleted Map(IDeleteDocumentType c) { var stateEventId = new DocumentTypeEventId(c.DocumentTypeId, c.Version); IDocumentTypeStateDeleted e = NewDocumentTypeStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
public void AddDocumentTypeEvent(IDocumentTypeStateDeleted e) { _innerStateEvents.Add((DocumentTypeStateDeletedDto)e); }
public virtual void Delete(IDeleteDocumentType c) { IDocumentTypeStateDeleted e = Map(c); Apply(e); }
void IDocumentTypeState.When(IDocumentTypeStateDeleted e) { throw new NotSupportedException(); }