7.4 KiB
7.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T02:33:09.531156+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | b60d1a2f75a9d685 |
TestSummary
Documentation: Test Summary List Module
1. Purpose
This module defines the interface contracts for a Test Summary List view and its associated ViewModel in a test data visualization system. It enables the display, selection, and management of test summary items—each representing a test run with associated metadata, channels, and graphs—within a list-based UI (e.g., a grid or list view). The module serves as the abstraction layer between the UI (via ITestSummaryListView) and the data/logic layer (via ITestSummaryListViewModel), supporting selection tracking, dynamic list updates (via ObservableCollection), and publishing of selected items for downstream processing.
2. Public Interface
ITestSummaryListView
- Inherits:
IBaseView - Description: A marker interface representing the view component for the test summary list UI. It has no additional members beyond inheritance, implying the view implementation is expected to conform to the base view contract (e.g., binding context, lifecycle hooks) but does not expose further view-specific APIs in this interface.
ITestSummaryListViewModel
-
Inherits:
IBaseViewModel -
Properties:
ITestSummaryListView View { get; }
Gets the associated Shell View instance (the concrete UI control bound to this ViewModel).ObservableCollection<ITestSummary> TestSummaryList { get; set; }
The primary collection of test summary items displayed in the list. Supports change notifications viaObservableCollection<T>.List<ITestSummary> SelectedTestSummaryList { get; set; }
A separate list tracking currently selectedITestSummaryitems (distinct fromTestSummaryList). Not observable—changes must be explicitly managed.
-
Methods:
void PublishSelectedTestSummaryList()
Triggers publication (e.g., event, message, or command) of the currentSelectedTestSummaryListto other parts of the system (e.g., for analysis, export, or visualization).void TestSummaryList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
HandlesCollectionChangedevents fromTestSummaryList(e.g., item added/removed/moved). Likely updates internal state (e.g., syncs selection, refreshes UI).
ITestSummary
- Inherits:
IBaseClass - Properties:
string Id { get; set; }
Unique identifier for the test summary.string SetupName { get; set; }
Name of the test setup/configuration used.string Description { get; set; }
Human-readable description of the test.int ChannelCount { get; set; }
Number of raw channels in the test.DateTime FileDate { get; set; }
Date the test data file was created/modified.DateTime TimeStamp { get; set; }
Timestamp of the test run (possibly when started or completed).string DataType { get; set; }
Type/classification of the test data (e.g., "Vibration", "Temperature").bool IsSelected { get; set; }
Indicates whether this item is currently selected in the UI.List<ITestGraphs> Graphs { get; set; }
Collection of graph definitions associated with this test.List<ITestChannel> Channels { get; set; }
List of raw measurement channels.List<ITestChannel> CalculatedChannels { get; set; }
List of derived/calculated channels (e.g., computed from raw channels).IBaseViewModel Parent { get; set; }
Reference to the parent ViewModel (e.g., for navigation or context).ITestMetadata TestMetadata { get; set; }
Structured metadata (e.g., test conditions, operator, equipment).CalibrationBehaviors CalibrationBehavior { get; set; }
Enumerated calibration behavior flags (fromDTS.Common.Enums.Sensors).
3. Invariants
TestSummaryListmust be anObservableCollection<ITestSummary>; direct replacement (e.g., assigning aList<T>) is allowed by the property setter but may require manual event subscription for change notifications.SelectedTestSummaryListis a plainList<ITestSummary>—no automatic synchronization withTestSummaryListorIsSelectedflags is implied. Updates to selection must be handled explicitly (e.g., viaTestSummaryList_CollectionChanged).ITestSummaryListViewModel.TestSummaryList_CollectionChangedis expected to be subscribed toTestSummaryList.CollectionChangedevents; failure to do so may result in stale selection state.IsSelectedon anITestSummaryinstance is not guaranteed to reflect its presence inSelectedTestSummaryListunless explicitly synchronized (e.g., inTestSummaryList_CollectionChanged).ParentonITestSummarymust be non-null if the item is part of a ViewModel-managed list (asParentis used for context).
4. Dependencies
This module depends on:
DTS.Common.Base(forIBaseView,IBaseViewModel,IBaseClass).System.Collections.Generic,System.Collections.ObjectModel,System.Collections.Specialized(for collection types).DTS.Common.Interface.TestDefinition(forITestSummary,ITestGraphs,ITestChannel,ITestMetadata).DTS.Common.Enums.Sensors(forCalibrationBehaviorsenum).
This module is depended upon by:
- Concrete implementations of
ITestSummaryListView(e.g., WPFUserControlorWindowhosting the list). - Concrete implementations of
ITestSummaryListViewModel(e.g., a ViewModel class managing test data display). - Any consumer of
PublishSelectedTestSummaryList()(e.g., a command handler, event listener, or service that processes selected tests). - Code that constructs or manipulates
ITestSummaryinstances (e.g., test data loaders, parsers).
5. Gotchas
- Selection Synchronization Risk:
SelectedTestSummaryListandIsSelectedare not automatically kept in sync. Implementations must manually update both (e.g., inTestSummaryList_CollectionChanged) to avoid inconsistencies. TestSummaryList_CollectionChangedis a method, not an event: It must be called explicitly (e.g., fromTestSummaryList.CollectionChanged += viewModel.TestSummaryList_CollectionChanged). It is not an event handler itself.TestSummaryListsetter allows reassignment: Assigning a newObservableCollection<ITestSummary>will require re-subscribing to itsCollectionChangedevent; the old collection’s subscription is lost.IsSelectedis a property onITestSummarybut not used in the interface contract: Its purpose is unclear without seeing implementations—likely used by the view for UI highlighting, but not enforced by the ViewModel interface.- No explicit ordering guarantees:
TestSummaryListorder is determined by the underlyingObservableCollection<T>; no sorting or ordering logic is defined in this interface. CalibrationBehaviorsenum usage: Its meaning and valid values are defined externally (DTS.Common.Enums.Sensors); behavior changes based on this property are not described here.
None identified beyond the above.