4.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T11:17:15.115446+00:00 | zai-org/GLM-5-FP8 | 1 | a0b85470cc6f6727 |
Documentation: DTS.Viewer.TestSummaryList Views
1. Purpose
This module provides WPF view components for displaying and interacting with test summaries in the DTS Viewer application. It contains two partial views—TestSummaryView and TestSummaryListView—both implementing ITestSummaryListView. The TestSummaryListView specifically adds keyboard interaction support for toggling test selection via the Space key. These views serve as the presentation layer for test summary data within a larger modular viewer architecture.
2. Public Interface
TestSummaryView (class)
Namespace: DTS.Viewer.TestSummaryList
Implements: ITestSummaryListView
| Member | Signature | Description |
|---|---|---|
| Constructor | public TestSummaryView() |
Initializes the view component by calling InitializeComponent(). |
TestSummaryListView (class)
Namespace: DTS.Viewer.TestSummaryList
Implements: ITestSummaryListView
| Member | Signature | Description |
|---|---|---|
| Constructor | public TestSummaryListView() |
Initializes the view component by calling InitializeComponent(). |
TestSummary_KeyUp |
private void TestSummary_KeyUp(object sender, KeyEventArgs e) |
Event handler that toggles the IsSelected property on a TestSummary object when the Space key is released, provided the sender is a ListView with a TestSummary as its SelectedItem. |
3. Invariants
- Both view classes implement
ITestSummaryListViewfromDTS.Common.Interface. TestSummaryListView.TestSummary_KeyUpwill only modifyIsSelectedif:- The
sendercan be cast to aListView. - The
ListView.SelectedItemcan be cast to aTestSummarytype. - The pressed key is
Key.Space.
- The
- If any of the above conditions fail,
e.Handledis set tofalse; otherwise, it is set totrue. - The
TestSummaryclass (fromDTS.Common.Classes.Viewer.TestMetadata) must have a publicIsSelectedproperty that is boolean-settable.
4. Dependencies
This module depends on:
| Dependency | Usage |
|---|---|
System.Windows |
WPF framework (FrameworkElement base class via partial class) |
System.Windows.Controls |
ListView control used in TestSummary_KeyUp |
System.Windows.Input |
Key enum and KeyEventArgs for keyboard handling |
DTS.Common.Interface |
ITestSummaryListView interface contract |
DTS.Common.Classes.Viewer.TestMetadata |
TestSummary data class |
DTS.Common.Interface.TestDefinition |
Imported in TestSummaryListView.xaml.cs but not visibly used in the code-behind |
What depends on this module:
- Unclear from source alone. Consumers would be modules that reference
ITestSummaryListViewor instantiate these views directly (likely via dependency injection or XAML composition in a parent view).
5. Gotchas
-
Misleading XML comment in
TestSummaryView.xaml.cs: The documentation comment states "Interaction logic for TestListView.xaml" but the class is namedTestSummaryView. This appears to be a copy-paste error from another view. -
Unused import:
DTS.Common.Interface.TestDefinitionis imported inTestSummaryListView.xaml.csbut not referenced in the code-behind. It may be used in the XAML file (not provided) or is dead code. -
Namespace directive: The
// ReSharper disable CheckNamespacedirective inTestSummaryListView.xaml.cssuggests the file location may not match the declared namespace, or ReSharper was producing warnings. The actual namespace discrepancy is not apparent from the source alone. -
Two classes implementing the same interface: Both
TestSummaryViewandTestSummaryListViewimplementITestSummaryListView. The relationship between these two views (inheritance, alternative implementations, or deprecated code) is unclear from the source alone.