public virtual void When(ILocatorStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
public virtual LocatorStateDeletedDto ToLocatorStateDeletedDto(ILocatorStateDeleted e) { var dto = new LocatorStateDeletedDto(); dto.StateEventId = new LocatorStateEventIdDtoWrapper(e.StateEventId); dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
protected virtual ILocatorStateDeleted Map(IDeleteLocator c) { var stateEventId = new LocatorEventId(c.LocatorId, c.Version); ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual ILocatorStateDeleted Map(IDeleteLocator c) { var stateEventId = new LocatorStateEventId(c.LocatorId, c.Version); ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }
protected virtual ILocatorStateDeleted Map(IDeleteLocator c) { var stateEventId = new LocatorStateEventId(c.LocatorId, c.Version); ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId); ReflectUtils.CopyPropertyValue("CommandId", c, e); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }
void ILocatorState.When(ILocatorStateDeleted e) { throw new NotSupportedException(); }
public void AddLocatorEvent(ILocatorStateDeleted e) { _innerStateEvents.Add((LocatorStateDeletedDto)e); }
public virtual void Delete(IDeleteLocator c) { ILocatorStateDeleted e = Map(c); Apply(e); }