protected virtual IWarehouseStateMergePatched Map(IMergePatchWarehouse c) { var stateEventId = new WarehouseEventId(c.WarehouseId, c.Version); IWarehouseStateMergePatched e = NewWarehouseStateMergePatched(stateEventId); e.WarehouseName = c.WarehouseName; e.Description = c.Description; e.IsInTransit = c.IsInTransit; e.Active = c.Active; e.IsPropertyWarehouseNameRemoved = c.IsPropertyWarehouseNameRemoved; e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved; e.IsPropertyIsInTransitRemoved = c.IsPropertyIsInTransitRemoved; e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
protected WarehouseStateDeleted NewWarehouseStateDeleted(long version, string commandId, string requesterId) { var stateEventId = new WarehouseEventId(_state.WarehouseId, version); var e = NewWarehouseStateDeleted(stateEventId); e.CommandId = commandId; e.CreatedBy = (string)requesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual IWarehouseStateDeleted Map(IDeleteWarehouse c) { var stateEventId = new WarehouseEventId(c.WarehouseId, c.Version); IWarehouseStateDeleted e = NewWarehouseStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } WarehouseEventId other = obj as WarehouseEventId; if (other == null) { return(false); } return(true && Object.Equals(this.WarehouseId, other.WarehouseId) && Object.Equals(this.Version, other.Version) ); }
protected WarehouseStateEventDtoBase(WarehouseEventId stateEventId) { this.WarehouseEventId = stateEventId; }
private WarehouseStateDeleted NewWarehouseStateDeleted(WarehouseEventId stateEventId) { return(new WarehouseStateDeleted(stateEventId)); }
private WarehouseStateMergePatched NewWarehouseStateMergePatched(WarehouseEventId stateEventId) { return(new WarehouseStateMergePatched(stateEventId)); }
public WarehouseStateDeleted(WarehouseEventId stateEventId) : base(stateEventId) { }
public WarehouseStateMergePatched(WarehouseEventId stateEventId) : base(stateEventId) { }
protected WarehouseStateEventBase(WarehouseEventId stateEventId) : base(stateEventId) { }