protected LotStateDeleted NewLotStateDeleted(long version, string commandId, string requesterId) { var stateEventId = new LotEventId(_state.LotId, version); var e = NewLotStateDeleted(stateEventId); e.CommandId = commandId; e.CreatedBy = (string)requesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual ILotStateDeleted Map(IDeleteLot c) { var stateEventId = new LotEventId(c.LotId, c.Version); ILotStateDeleted e = NewLotStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual ILotStateCreated Map(ICreateLot c) { var stateEventId = new LotEventId(c.LotId, c.Version); ILotStateCreated e = NewLotStateCreated(stateEventId); e.Quantity = c.Quantity; e.ExpirationDate = c.ExpirationDate; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } LotEventId other = obj as LotEventId; if (other == null) { return(false); } return(true && Object.Equals(this.LotId, other.LotId) && Object.Equals(this.Version, other.Version) ); }
private LotStateDeleted NewLotStateDeleted(LotEventId stateEventId) { return(new LotStateDeleted(stateEventId)); }
private LotStateMergePatched NewLotStateMergePatched(LotEventId stateEventId) { return(new LotStateMergePatched(stateEventId)); }
protected LotEventBase(LotEventId stateEventId) { this.LotEventId = stateEventId; }
public LotStateDeleted(LotEventId stateEventId) : base(stateEventId) { }
public LotStateMergePatched(LotEventId stateEventId) : base(stateEventId) { }
public LotStateCreated(LotEventId stateEventId) : base(stateEventId) { }
protected LotStateEventBase(LotEventId stateEventId) : base(stateEventId) { }