Class EntityHierarchyExtensions
A helper class for moving entities within the internal EntityManager or internal Entity.
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 the target entity's 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 the source in the move operation. |
Guid? | targetChildId | The ID of the child entity used as the 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 the 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 the source in the move operation. |
Guid? | targetChildId | The ID of the child entity used as the 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 the 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 the source in the move operation. |
Guid? | targetChildId | The ID of the child entity used as the 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 the 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 the source in the move operation. |
Guid? | targetChildId | The ID of the child entity used as the target in the move operation. |