Skip to content

[UI/Core Split] Refactor MoveItem in Utilities #176

@benfleuty

Description

@benfleuty

The MoveItem method in Utilities.cs directly manipulates a BindingList<T>. While the concept of moving an item within a list is general, the reliance on BindingList couples this method to the UI layer.

To improve the separation and create more reusable core logic, this method should ideally operate on a more generic list interface or a standard List<T>.

Action:

  1. Create a new method in a core-level class (e.g., CollectionsUtils.cs) that accepts an IList<T> or List<T> and performs the item movement.
  2. Move the item movement logic from MoveItem to this new core method.
  3. Modify MoveItem to call the new core method, or ideally, have the UI call the core method directly for list manipulation.
  4. Update any code that uses MoveItem to align with the refactored structure.
  5. Add or update tests for the core item movement logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions