6.6 KiB
6.6 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T03:07:52.259971+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 710dfe38f0bd83ca |
TestSummary
Documentation: Test Summary List Module
1. Purpose
This module defines the interface contracts for a Test Summary List view and its associated view model in a test data viewer application. It enables the display and management of a list of test summaries (ITestSummary), supporting selection tracking (SelectedTestSummaryList), UI binding via ObservableCollection, and propagation of selection changes through the PublishSelectedTestSummaryList() method. It serves as the data and presentation layer abstraction for a list-based UI component (e.g., a grid or list view) that shows metadata about recorded tests, including setup name, channel count, timestamps, and associated graphs/channels.
2. Public Interface
ITestSummaryListView
- Inherits:
IBaseView - Description: A marker interface representing the view layer for the test summary list. No additional members defined; intended for dependency injection or view-model-to-view binding.
ITestSummaryListViewModel
- Inherits:
IBaseViewModel - Properties:
ITestSummaryListView View { get; }
Gets the associated view instance.ObservableCollection<ITestSummary> TestSummaryList { get; set; }
The full list of test summaries displayed in the UI; observable for collection change notifications.List<ITestSummary> SelectedTestSummaryList { get; set; }
The subset ofTestSummaryListitems currently selected by the user. Not observable; changes must be explicitly published.
- Methods:
void PublishSelectedTestSummaryList()
Triggers propagation of the currentSelectedTestSummaryListto downstream consumers (e.g., via event or messaging).void TestSummaryList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
HandlesCollectionChangedevents forTestSummaryList, likely updating internal state (e.g.,SelectedTestSummaryList) when items are added/removed/moved.
ITestSummary
- Inherits:
IBaseClass - Properties:
string Id { get; set; }
Unique identifier for the test.string SetupName { get; set; }
Name of the test setup configuration.string Description { get; set; }
Human-readable description of the test.int ChannelCount { get; set; }
Number of physical channels recorded in the test.DateTime FileDate { get; set; }
Date the test file was created or last modified.DateTime TimeStamp { get; set; }
Timestamp of the test event (e.g., start time).string DataType { get; set; }
Type of data recorded (e.g., "Raw", "Processed").bool IsSelected { get; set; }
UI state flag indicating if this item is selected in the list.List<ITestGraphs> Graphs { get; set; }
List of graph definitions associated with this test.List<ITestChannel> Channels { get; set; }
List of physical channels in the test.List<ITestChannel> CalculatedChannels { get; set; }
List of derived/calculated channels.IBaseViewModel Parent { get; set; }
Reference to the parent view model in the hierarchy.ITestMetadata TestMetadata { get; set; }
Metadata object containing additional test details.CalibrationBehaviors CalibrationBehavior { get; set; }
Enumerated value indicating calibration behavior (fromDTS.Common.Enums.Sensors).
3. Invariants
TestSummaryListmust be anObservableCollection<ITestSummary>to support UI binding and change notifications.SelectedTestSummaryListis a plainList<ITestSummary>; selection state is not automatically synchronized withTestSummaryList. The caller must callPublishSelectedTestSummaryList()to propagate changes.TestSummaryList_CollectionChangedmust be subscribed toTestSummaryList.CollectionChangedto maintain consistency between the full list and the selected list.IsSelectedon individualITestSummaryinstances reflects UI selection state but is not the source of truth forSelectedTestSummaryList; the latter is the authoritative list of selected items.ParentonITestSummarymust be non-null if the summary is part of a view model hierarchy (implied byIBaseViewModelinheritance).
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:
- Likely concrete implementations of
ITestSummaryListView(e.g., WPFUserControlorWindow) - View model implementations of
ITestSummaryListViewModel(e.g.,TestSummaryListViewModel) - Any module responsible for publishing or consuming selected test summaries (e.g., analysis or reporting modules)
5. Gotchas
SelectedTestSummaryListis aList<T>, notObservableCollection<T>, meaning UI selection changes (e.g., via checkboxes) must manually update this list and callPublishSelectedTestSummaryList()to notify consumers.TestSummaryList_CollectionChangedis exposed as a public method but not declared as an event handler in the interface; callers must manually wire it toTestSummaryList.CollectionChanged.IsSelectedonITestSummaryis a view-level property (likely bound to UI controls) but does not driveSelectedTestSummaryList; relying on it as the source of truth for selection will cause inconsistencies.- No documentation is provided for when
PublishSelectedTestSummaryList()should be called (e.g., on selection change, on save, or manually). This behavior is implementation-specific. - The relationship between
FileDateandTimeStampis ambiguous (e.g., which is more reliable for sorting?); no guidance is given. - None of the
List<T>properties (Graphs,Channels,CalculatedChannels) are initialized in the interface; implementations must ensure non-null initialization to avoidNullReferenceException. - None identified from source alone.