protected virtual IStatusItemStateMergePatched Map(IMergePatchStatusItem c) { var stateEventId = new StatusItemEventId(c.StatusId, c.Version); IStatusItemStateMergePatched e = NewStatusItemStateMergePatched(stateEventId); e.StatusTypeId = c.StatusTypeId; e.StatusCode = c.StatusCode; e.SequenceId = c.SequenceId; e.Description = c.Description; e.Active = c.Active; e.IsPropertyStatusTypeIdRemoved = c.IsPropertyStatusTypeIdRemoved; e.IsPropertyStatusCodeRemoved = c.IsPropertyStatusCodeRemoved; e.IsPropertySequenceIdRemoved = c.IsPropertySequenceIdRemoved; e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved; 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 StatusItemStateMergePatched NewStatusItemStateMergePatched(long version, string commandId, string requesterId) { var stateEventId = new StatusItemEventId(_state.StatusId, version); var e = NewStatusItemStateMergePatched(stateEventId); e.CommandId = commandId; e.CreatedBy = (string)requesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } StatusItemEventId other = obj as StatusItemEventId; if (other == null) { return(false); } return(true && Object.Equals(this.StatusId, other.StatusId) && Object.Equals(this.Version, other.Version) ); }
protected StatusItemEventBase(StatusItemEventId stateEventId) { this.StatusItemEventId = stateEventId; }
public StatusItemStateMergePatched(StatusItemEventId stateEventId) : base(stateEventId) { }
public StatusItemStateCreated(StatusItemEventId stateEventId) : base(stateEventId) { }
protected StatusItemStateEventBase(StatusItemEventId stateEventId) : base(stateEventId) { }
private StatusItemStateMergePatched NewStatusItemStateMergePatched(StatusItemEventId stateEventId) { return(new StatusItemStateMergePatched(stateEventId)); }
//////////////////////// private StatusItemStateCreated NewStatusItemStateCreated(StatusItemEventId stateEventId) { return(new StatusItemStateCreated(stateEventId)); }