--- source_files: - DataPRO/Modules/TestSetups/TestSetupsList/Model/TestSetupComparer.cs generated_at: "2026-04-17T16:15:37.019693+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "6eb89071d4a03a7e" --- # Model ### Purpose This module provides comparison logic for sorting `ITestSetup` objects in a list. It exists to enable flexible, multi-field sorting of test setup records with support for both ascending and descending order, abstracting the comparison rules from the view and ViewModel layers. ### Public Interface **`TestSetupComparer` (class)** - Signature: `public class TestSetupComparer : IComparer` - Description: A comparer class that defines sorting behavior for `ITestSetup` instances based on configurable field and direction. **Properties:** - `SortField` (`TestSetupFields`): The field to sort by. Defaults to `TestSetupFields.Name`. - `SortAscending` (`bool`): The sort direction. Defaults to `true`. When `false`, the comparison operands are swapped. **`Compare(ITestSetup left, ITestSetup right)`** - Signature: `public int Compare(ITestSetup left, ITestSetup right)` - Description