Files
DP44/docs/ai/Common/DTS.Common/Interface/TestSetups/CachedItemsList.md
2026-04-17 14:55:32 -04:00

2.7 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Interface/TestSetups/CachedItemsList/ICachedItemsListView.cs
Common/DTS.Common/Interface/TestSetups/CachedItemsList/ICachedItem.cs
Common/DTS.Common/Interface/TestSetups/CachedItemsList/ICachedItemsListViewModel.cs
2026-04-17T16:35:55.757289+00:00 zai-org/GLM-5-FP8 1 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:

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