Class EntityHierarchyExtensions
A helper class for moving entities in internal EntityManager or internal Entity.
Inherited Members
Namespace: Evergine.Framework.Extensions
Assembly: Evergine.Framework.dll
Syntax
public static class EntityHierarchyExtensions
Methods
MoveEntityAfter(Entity, Guid, Guid?)
Moves the source entity after the target entity in the child list. Both entities must be children of this entity. If target entity name is null the source entity will be moved to the start.
Declaration
public static void MoveEntityAfter(this Entity entity, Guid sourceChildId, Guid? targetChildId)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The parent Entity. |
Guid | sourceChildId | The id of the child entity used as source in the move operation. |
Guid? | targetChildId | The id of the child entity used as target in the move operation. |
MoveEntityAfter(EntityManager, Guid, Guid?)
Moves the source entity after the target entity in the child list. Both entities must be children of this entity. If target entity name is null the source entity will be moved to the start.
Declaration
public static void MoveEntityAfter(this EntityManager entityManager, Guid sourceChildId, Guid? targetChildId)
Parameters
Type | Name | Description |
---|---|---|
EntityManager | entityManager | The target EntityManager. |
Guid | sourceChildId | The id of the child entity used as source in the move operation. |
Guid? | targetChildId | The id of the child entity used as target in the move operation. |
MoveEntityBefore(Entity, Guid, Guid?)
Moves the source entity before the target entity in the child list. Both entities must be children of this entity. If target entity name is null the source entity will be moved to the end.
Declaration
public static void MoveEntityBefore(this Entity entity, Guid sourceChildId, Guid? targetChildId)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The parent Entity. |
Guid | sourceChildId | The id of the child entity used as source in the move operation. |
Guid? | targetChildId | The id of the child entity used as target in the move operation. |
MoveEntityBefore(EntityManager, Guid, Guid?)
Moves the source entity before the target entity in the child list. Both entities must be children of this entity. If target entity name is null the source entity will be moved to the end.
Declaration
public static void MoveEntityBefore(this EntityManager entityManager, Guid sourceChildId, Guid? targetChildId)
Parameters
Type | Name | Description |
---|---|---|
EntityManager | entityManager | The target EntityManager. |
Guid | sourceChildId | The id of the child entity used as source in the move operation. |
Guid? | targetChildId | The id of the child entity used as target in the move operation. |