public virtual void When(IPermissionStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
public virtual PermissionStateDeletedDto ToPermissionStateDeletedDto(IPermissionStateDeleted e) { var dto = new PermissionStateDeletedDto(); dto.PermissionEventId = e.PermissionEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
protected virtual IPermissionStateDeleted Map(IDeletePermission c) { var stateEventId = new PermissionStateEventId(c.PermissionId, c.Version); IPermissionStateDeleted e = NewPermissionStateDeleted(stateEventId); ReflectUtils.CopyPropertyValue("CommandId", c, e); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }
protected virtual IPermissionStateDeleted Map(IDeletePermission c) { var stateEventId = new PermissionEventId(c.PermissionId, c.Version); IPermissionStateDeleted e = NewPermissionStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual IPermissionStateDeleted Map(IDeletePermission c) { var stateEventId = new PermissionStateEventId(c.PermissionId, c.Version); IPermissionStateDeleted e = NewPermissionStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }
public virtual void Delete(IDeletePermission c) { IPermissionStateDeleted e = Map(c); Apply(e); }
void IPermissionState.When(IPermissionStateDeleted e) { throw new NotSupportedException(); }
public void AddPermissionEvent(IPermissionStateDeleted e) { _innerStateEvents.Add((PermissionStateDeletedDto)e); }