Files

27 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- DataPRO/Modules/TestSetups/CachedItemsList/Model/CachedItem.cs
generated_at: "2026-04-17T16:15:37.020486+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "535fd714b2c15b81"
---
# 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<ITestSetup>`
- 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