public virtual Entity Build(EntityManagerWrapper wrapper)
        {
            isBuilt = true;
            var entity = creationStrategy.Create(wrapper, variables);

            OnPreBuildHandler?.Invoke();

            OnPreBuild(wrapper);

            foreach (var step in steps)
            {
                step.Process(wrapper, variables, entity);
            }

            OnPostBuildHandler?.Invoke(EntityWrapper.Wrap(entity, wrapper));

            return(entity);
        }
Exemple #2
0
        public virtual Entity Build(EntityManagerWrapper wrapper)
        {
            m_built = true;
            var entity = m_creationStrategy.Create(wrapper, m_variables);

            preBuild?.Invoke();

            OnPreBuild(wrapper);

            foreach (var step in m_steps)
            {
                step.Process(wrapper, m_variables, entity);
            }

            OnPostBuild(wrapper, entity);

            postBuild?.Invoke(EntityWrapper.Wrap(entity, wrapper));

            return(entity);
        }
Exemple #3
0
 public EntityWrapper Wrap(Entity entity)
 {
     return(EntityWrapper.Wrap(entity, this));
 }
Exemple #4
0
 public EntityWrapper CreateEntityAndWrap()
 {
     return(EntityWrapper.Wrap(CreateEntity(), this));
 }