public virtual void When(IAttributeUseStateRemoved e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
}// END Map(IMergePatch... //////////////////////////// protected virtual IAttributeUseStateRemoved MapRemove(IRemoveAttributeUse c, IAttributeSetCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new AttributeUseStateEventId(c.AttributeSetId, c.AttributeId, version); IAttributeUseStateRemoved e = NewAttributeUseStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }// END Map(IRemove... ////////////////////////////
}// END Map(IMergePatch... //////////////////////////// protected virtual IAttributeUseStateRemoved MapRemove(IRemoveAttributeUse c, IAttributeSetCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new AttributeUseEventId(c.AttributeSetId, c.AttributeId, version); IAttributeUseStateRemoved e = NewAttributeUseStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
public virtual AttributeUseStateRemovedDto ToAttributeUseStateRemovedDto(IAttributeUseStateRemoved e) { var dto = new AttributeUseStateRemovedDto(); dto.StateEventId = new AttributeUseStateEventIdDtoWrapper(e.StateEventId); dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.Version = e.Version; dto.CommandId = e.CommandId; return(dto); }
public void AddAttributeUseEvent(IAttributeUseStateRemoved e) { _innerStateEvents.Add((AttributeUseStateRemovedDto)e); }
void IAttributeUseState.When(IAttributeUseStateRemoved e) { throw new NotSupportedException(); }
public virtual void AddAttributeUseEvent(IAttributeUseStateRemoved e) { ThrowOnInconsistentEventIds(e); this._attributeUseEvents[e.AttributeUseEventId] = e; }
void IAttributeSetStateDeleted.AddAttributeUseEvent(IAttributeUseStateRemoved e) { this._attributeUseEvents.AddAttributeUseEvent(e); }