public virtual void When(IContactMechStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
public virtual ContactMechStateDeletedDto ToContactMechStateDeletedDto(IContactMechStateDeleted e) { var dto = new ContactMechStateDeletedDto(); dto.ContactMechEventId = e.ContactMechEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
protected virtual IContactMechStateDeleted Map(IDeleteContactMech c) { var stateEventId = new ContactMechEventId(c.ContactMechId, c.Version); IContactMechStateDeleted e = NewContactMechStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
public void AddContactMechEvent(IContactMechStateDeleted e) { _innerStateEvents.Add((ContactMechStateDeletedDto)e); }
public virtual void Delete(IDeleteContactMech c) { IContactMechStateDeleted e = Map(c); Apply(e); }
void IContactMechState.When(IContactMechStateDeleted e) { throw new NotSupportedException(); }