protected virtual IAttributeSetStateCreated Map(ICreateAttributeSet c) { var stateEventId = new AttributeSetStateEventId(c.AttributeSetId, c.Version); IAttributeSetStateCreated e = NewAttributeSetStateCreated(stateEventId); e.Name = c.Name; e.OrganizationId = c.OrganizationId; e.Description = c.Description; e.SerialNumberAttributeId = c.SerialNumberAttributeId; e.LotAttributeId = c.LotAttributeId; e.ReferenceId = c.ReferenceId; e.Active = c.Active; ReflectUtils.CopyPropertyValue("CommandId", c, e); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; var version = c.Version; foreach (ICreateAttributeUse innerCommand in c.AttributeUses) { ThrowOnInconsistentCommands(c, innerCommand); IAttributeUseStateCreated innerEvent = MapCreate(innerCommand, c, version, _state); e.AddAttributeUseEvent(innerEvent); } return(e); }
protected AttributeSetStateDeleted NewAttributeSetStateDeleted(string commandId, string requesterId) { var stateEventId = new AttributeSetStateEventId(_state.AttributeSetId, ((IAttributeSetStateProperties)_state).Version); var e = NewAttributeSetStateDeleted(stateEventId); e.CommandId = commandId; e.CreatedBy = (string)requesterId; e.CreatedAt = DateTime.Now; return(e); }
protected virtual IAttributeSetStateDeleted Map(IDeleteAttributeSet c) { var stateEventId = new AttributeSetStateEventId(c.AttributeSetId, c.Version); IAttributeSetStateDeleted e = NewAttributeSetStateDeleted(stateEventId); ReflectUtils.CopyPropertyValue("CommandId", c, e); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } AttributeSetStateEventId other = obj as AttributeSetStateEventId; if (other == null) { return(false); } return(true && Object.Equals(this.AttributeSetId, other.AttributeSetId) && Object.Equals(this.Version, other.Version) ); }
private AttributeSetStateDeleted NewAttributeSetStateDeleted(AttributeSetStateEventId stateEventId) { return(new AttributeSetStateDeleted(stateEventId)); }
private AttributeSetStateMergePatched NewAttributeSetStateMergePatched(AttributeSetStateEventId stateEventId) { return(new AttributeSetStateMergePatched(stateEventId)); }
public AttributeSetStateEventIdFlattenedDto(AttributeSetStateEventId val) { this._value = val; }
public AttributeSetStateDeleted(AttributeSetStateEventId stateEventId) : base(stateEventId) { }
public AttributeSetStateMergePatched(AttributeSetStateEventId stateEventId) : base(stateEventId) { }
protected AttributeSetStateEventBase(AttributeSetStateEventId stateEventId) { this.StateEventId = stateEventId; }