public virtual void When(IOrganizationStructureTypeStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
        protected virtual IOrganizationStructureTypeStateDeleted Map(IDeleteOrganizationStructureType c)
        {
            var stateEventId = new OrganizationStructureTypeStateEventId(c.Id, c.Version);
            IOrganizationStructureTypeStateDeleted e = NewOrganizationStructureTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;


            return(e);
        }
Ejemplo n.º 3
0
        protected virtual IOrganizationStructureTypeStateDeleted Map(IDeleteOrganizationStructureType c)
        {
            var stateEventId = new OrganizationStructureTypeEventId(c.Id, c.Version);
            IOrganizationStructureTypeStateDeleted e = NewOrganizationStructureTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
        public virtual void Delete(IDeleteOrganizationStructureType c)
        {
            IOrganizationStructureTypeStateDeleted e = Map(c);

            Apply(e);
        }
        public virtual OrganizationStructureTypeStateDeletedDto ToOrganizationStructureTypeStateDeletedDto(IOrganizationStructureTypeStateDeleted e)
        {
            var dto = new OrganizationStructureTypeStateDeletedDto();

            dto.StateEventId = new OrganizationStructureTypeStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;

            return(dto);
        }
Ejemplo n.º 6
0
 public void AddOrganizationStructureTypeEvent(IOrganizationStructureTypeStateDeleted e)
 {
     _innerStateEvents.Add((OrganizationStructureTypeStateDeletedDto)e);
 }
 void IOrganizationStructureTypeState.When(IOrganizationStructureTypeStateDeleted e)
 {
     throw new NotSupportedException();
 }