This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
---
source_files:
- Common/DTS.Common/Interface/TestSetups/CachedItemsList/ICachedItemsListView.cs
- Common/DTS.Common/Interface/TestSetups/CachedItemsList/ICachedItem.cs
- Common/DTS.Common/Interface/TestSetups/CachedItemsList/ICachedItemsListViewModel.cs
generated_at: "2026-04-17T16:35:55.757289+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "75da6219632a1dae"
---
# Documentation: DTS.Common.Interface.TestSetups.CachedItemsList
## 1. Purpose
This module defines the contract for a cached items list component within a test setup system. It provides interfaces for tracking and displaying cached items (sensors, calibrations, and DAS hardware), enabling comparison between cached state and database state to identify stale or missing items. The module follows a Model-View-ViewModel (MVVM) pattern, separating the view concerns from the presentation logic.
---
## 2. Public Interface
### `ICachedItemsListView`
**Signature:** `public interface ICachedItemsListView : IBaseView { }`
A marker interface extending `IBaseView` with no additional members. Represents the view abstraction for displaying cached items.
---
### `ICachedItem`
**Signature:** `public interface ICachedItem`
Defines the data contract for a single cached item.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `Name` | `string` | get | The name of the cached item. |
| `ObjectType` | `string` | get | The type of the cached object. |
| `CacheTime` | `DateTime` | get | The timestamp when the item was cached. |
| `DBTime` | `DateTime` | get | The last modified time in the database. Returns `DateTime.MinValue` if the item no longer exists in the database. |
---
### `ICachedItemsListViewModel`
**Signature:** `public interface ICachedItemsListViewModel : IBaseViewModel`
Defines the presentation logic for the cached items list view.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `View` | `ICachedItemsListView` | get/set | The associated view instance. |
| `CachedItems` | `ICachedItem[]` | get/set | Array of cached items managed by this view model. |
| `HasOutofDateCachedItems` | `bool` | get | Indicates whether any cached items are out of date. |
| `HasMissingSensors` | `bool` | get | Indicates whether there are missing sensors. |
**Methods:**
```csharp
bool SetCachedItems(ISensorData[] sensors, ISensorCalibration[] sensorCalibrations, IDASHardware[] hardware, IDASHardware[] allDAS)
```
Populates the cached items collection based on the provided sensor data, calibrations, and hardware arrays. Returns `bool` indicating success or failure.
---
## 3. Invariants
1. **DBTime Sentinel Value:** When `ICachedItem.DBTime`