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);
        }
示例#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);
        }