Ejemplo n.º 1
0
        public virtual void When(IAttributeAliasStateRemoved e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Ejemplo n.º 2
0
        public virtual AttributeAliasStateRemovedDto ToAttributeAliasStateRemovedDto(IAttributeAliasStateRemoved e)
        {
            var dto = new AttributeAliasStateRemovedDto();

            dto.AttributeAliasEventId = e.AttributeAliasEventId;
            dto.CreatedAt             = e.CreatedAt;
            dto.CreatedBy             = e.CreatedBy;
            dto.Version   = e.Version;
            dto.CommandId = e.CommandId;

            return(dto);
        }
Ejemplo n.º 3
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IAttributeAliasStateRemoved MapRemove(IRemoveAttributeAlias c, IAttributeCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new AttributeAliasEventId(c.AttributeId, c.Code, version);
            IAttributeAliasStateRemoved e = NewAttributeAliasStateRemoved(stateEventId);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }// END Map(IRemove... ////////////////////////////
Ejemplo n.º 4
0
 void IAttributeAliasState.When(IAttributeAliasStateRemoved e)
 {
     throw new NotSupportedException();
 }
Ejemplo n.º 5
0
 public virtual void AddAttributeAliasEvent(IAttributeAliasStateRemoved e)
 {
     ThrowOnInconsistentEventIds(e);
     this._attributeAliasEvents[e.AttributeAliasEventId] = e;
 }
Ejemplo n.º 6
0
 void IAttributeStateDeleted.AddAttributeAliasEvent(IAttributeAliasStateRemoved e)
 {
     this._attributeAliasEvents.AddAttributeAliasEvent(e);
 }
Ejemplo n.º 7
0
 public void AddAttributeAliasEvent(IAttributeAliasStateRemoved e)
 {
     _innerStateEvents.Add((AttributeAliasStateRemovedDto)e);
 }