private GoodIdentificationEventId NewGoodIdentificationEventId(string goodIdentificationTypeId) { var eId = new GoodIdentificationEventId(); eId.ProductId = this.ProductEventId.ProductId; eId.GoodIdentificationTypeId = goodIdentificationTypeId; eId.ProductVersion = this.ProductEventId.Version; return(eId); }
}// END Map(IMergePatch... //////////////////////////// protected virtual IGoodIdentificationStateRemoved MapRemove(IRemoveGoodIdentification c, IProductCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new GoodIdentificationEventId(c.ProductId, c.GoodIdentificationTypeId, version); IGoodIdentificationStateRemoved e = NewGoodIdentificationStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
protected virtual IGoodIdentificationStateCreated MapCreate(ICreateGoodIdentification c, IProductCommand outerCommand, long version, IProductState outerState) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new GoodIdentificationEventId(c.ProductId, c.GoodIdentificationTypeId, version); IGoodIdentificationStateCreated e = NewGoodIdentificationStateCreated(stateEventId); var s = outerState.GoodIdentifications.Get(c.GoodIdentificationTypeId, true); e.IdValue = c.IdValue; e.Active = c.Active; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(ICreate... ////////////////////////////
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } GoodIdentificationEventId other = obj as GoodIdentificationEventId; if (other == null) { return(false); } return(true && Object.Equals(this.ProductId, other.ProductId) && Object.Equals(this.GoodIdentificationTypeId, other.GoodIdentificationTypeId) && Object.Equals(this.ProductVersion, other.ProductVersion) ); }
protected GoodIdentificationEventId NewGoodIdentificationEventId(string goodIdentificationTypeId) { var stateEventId = new GoodIdentificationEventId(this.ProductEventId.ProductId, goodIdentificationTypeId, this.ProductEventId.Version); return(stateEventId); }
private GoodIdentificationStateRemoved NewGoodIdentificationStateRemoved(GoodIdentificationEventId stateEventId) { return(new GoodIdentificationStateRemoved(stateEventId)); }
private GoodIdentificationStateMergePatched NewGoodIdentificationStateMergePatched(GoodIdentificationEventId stateEventId) { return(new GoodIdentificationStateMergePatched(stateEventId)); }
protected GoodIdentificationEventBase(GoodIdentificationEventId stateEventId) { this.GoodIdentificationEventId = stateEventId; }
public GoodIdentificationStateRemoved(GoodIdentificationEventId stateEventId) : base(stateEventId) { }
public GoodIdentificationStateMergePatched(GoodIdentificationEventId stateEventId) : base(stateEventId) { }
protected GoodIdentificationStateEventBase(GoodIdentificationEventId stateEventId) : base(stateEventId) { }