protected virtual IPicklistBinStateMergePatched Map(IMergePatchPicklistBin c) { var stateEventId = new PicklistBinEventId(c.PicklistBinId, c.Version); IPicklistBinStateMergePatched e = NewPicklistBinStateMergePatched(stateEventId); e.PicklistId = c.PicklistId; e.BinLocationNumber = c.BinLocationNumber; e.PrimaryOrderId = c.PrimaryOrderId; e.PrimaryShipGroupSeqId = c.PrimaryShipGroupSeqId; e.Active = c.Active; e.IsPropertyPicklistIdRemoved = c.IsPropertyPicklistIdRemoved; e.IsPropertyBinLocationNumberRemoved = c.IsPropertyBinLocationNumberRemoved; e.IsPropertyPrimaryOrderIdRemoved = c.IsPropertyPrimaryOrderIdRemoved; e.IsPropertyPrimaryShipGroupSeqIdRemoved = c.IsPropertyPrimaryShipGroupSeqIdRemoved; e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; foreach (IPicklistItemCommand innerCommand in c.PicklistItemCommands) { ThrowOnInconsistentCommands(c, innerCommand); IPicklistItemEvent innerEvent = Map(innerCommand, c, version, _state); e.AddPicklistItemEvent(innerEvent); } return(e); }
protected PicklistBinStateDeleted NewPicklistBinStateDeleted(long version, string commandId, string requesterId) { var stateEventId = new PicklistBinEventId(_state.PicklistBinId, version); var e = NewPicklistBinStateDeleted(stateEventId); e.CommandId = commandId; e.CreatedBy = (string)requesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
protected virtual IPicklistBinStateDeleted Map(IDeletePicklistBin c) { var stateEventId = new PicklistBinEventId(c.PicklistBinId, c.Version); IPicklistBinStateDeleted e = NewPicklistBinStateDeleted(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); } PicklistBinEventId other = obj as PicklistBinEventId; if (other == null) { return(false); } return(true && Object.Equals(this.PicklistBinId, other.PicklistBinId) && Object.Equals(this.Version, other.Version) ); }
protected PicklistBinEventBase(PicklistBinEventId stateEventId) { this.PicklistBinEventId = stateEventId; }
public PicklistBinStateDeleted(PicklistBinEventId stateEventId) : base(stateEventId) { }
public PicklistBinStateMergePatched(PicklistBinEventId stateEventId) : base(stateEventId) { }
protected PicklistBinStateEventBase(PicklistBinEventId stateEventId) : base(stateEventId) { }
private PicklistBinStateDeleted NewPicklistBinStateDeleted(PicklistBinEventId stateEventId) { return(new PicklistBinStateDeleted(stateEventId)); }
private PicklistBinStateMergePatched NewPicklistBinStateMergePatched(PicklistBinEventId stateEventId) { return(new PicklistBinStateMergePatched(stateEventId)); }