public void publicLoadEntity(ValuesDictionary valuesDictionary, IdToEntityMap idToEntityMap) { foreach (Component component in m_components) { try { component.Load(component.ValuesDictionary, idToEntityMap); } catch (Exception innerException) { throw new InvalidOperationException($"Error loading component {component.GetType().FullName}.", innerException); } } }
public Entity CreateEntity(ValuesDictionary valuesDictionary) { try { Entity entity = new Entity(this, valuesDictionary); IdToEntityMap idToEntityMap = new IdToEntityMap(new Dictionary <int, Entity>()); entity.publicLoadEntity(valuesDictionary, idToEntityMap); return(entity); } catch (Exception innerException) { throw new Exception($"Error creating entity from template \"{valuesDictionary.DatabaseObject.Name}\".", innerException); } }
public virtual void Load(ValuesDictionary valuesDictionary, IdToEntityMap idToEntityMap) { }