private AttributeValueEventId NewAttributeValueEventId(string value) { var eId = new AttributeValueEventId(); eId.AttributeId = this.AttributeEventId.AttributeId; eId.Value = value; eId.AttributeVersion = this.AttributeEventId.Version; return(eId); }
}// END Map(IMergePatch... //////////////////////////// protected virtual IAttributeValueStateRemoved MapRemove(IRemoveAttributeValue c, IAttributeCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new AttributeValueEventId(c.AttributeId, c.Value, version); IAttributeValueStateRemoved e = NewAttributeValueStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
protected virtual IAttributeValueStateCreated MapCreate(ICreateAttributeValue c, IAttributeCommand outerCommand, long version, IAttributeState outerState) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new AttributeValueEventId(c.AttributeId, c.Value, version); IAttributeValueStateCreated e = NewAttributeValueStateCreated(stateEventId); var s = outerState.AttributeValues.Get(c.Value, true); e.AttributeValueName = c.AttributeValueName; e.Description = c.Description; e.ReferenceId = c.ReferenceId; 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); } AttributeValueEventId other = obj as AttributeValueEventId; if (other == null) { return(false); } return(true && Object.Equals(this.AttributeId, other.AttributeId) && Object.Equals(this.Value, other.Value) && Object.Equals(this.AttributeVersion, other.AttributeVersion) ); }
protected AttributeValueEventBase(AttributeValueEventId stateEventId) { this.AttributeValueEventId = stateEventId; }
public AttributeValueStateRemoved(AttributeValueEventId stateEventId) : base(stateEventId) { }
public AttributeValueStateMergePatched(AttributeValueEventId stateEventId) : base(stateEventId) { }
public AttributeValueStateCreated(AttributeValueEventId stateEventId) : base(stateEventId) { }
protected AttributeValueStateEventBase(AttributeValueEventId stateEventId) : base(stateEventId) { }
protected AttributeValueEventId NewAttributeValueEventId(string value) { var stateEventId = new AttributeValueEventId(this.AttributeEventId.AttributeId, value, this.AttributeEventId.Version); return(stateEventId); }
private AttributeValueStateRemoved NewAttributeValueStateRemoved(AttributeValueEventId stateEventId) { return(new AttributeValueStateRemoved(stateEventId)); }
private AttributeValueStateMergePatched NewAttributeValueStateMergePatched(AttributeValueEventId stateEventId) { return(new AttributeValueStateMergePatched(stateEventId)); }