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); }
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); }
public EntityWrapper Wrap(Entity entity) { return(EntityWrapper.Wrap(entity, this)); }
public EntityWrapper CreateEntityAndWrap() { return(EntityWrapper.Wrap(CreateEntity(), this)); }