6.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T12:16:35.672388+00:00 | zai-org/GLM-5-FP8 | 1 | d625778ef337fcd6 |
Documentation: DTS.Common.Interface Viewer Interfaces
1. Purpose
This module defines a set of view and view model interfaces for the DTS application's viewer components, implementing a Model-View-ViewModel (MVVM) architecture. These interfaces establish contracts for UI composition using a region-based pattern, where views are injected into named context regions (navigation, graphs, tests, legends, etc.). The module serves as the abstraction layer between concrete view implementations and the presentation logic, enabling loose coupling and testability of the viewer subsystem.
2. Public Interface
View Interfaces
All view interfaces inherit from IBaseView (defined in DTS.Common.Base) and currently declare no additional members.
| Interface | File | Description |
|---|---|---|
IMainView |
IMainView.cs |
Marker interface for the main view. |
IMenuView |
IMenuView.cs |
Marker interface for menu view components. |
IFilterView |
IFilterView.cs |
Marker interface for filter view components. |
INavigationView |
INavigationView.cs |
Marker interface for navigation view components. |
ITestSummaryListView |
ITestDefinitionListView.cs |
Marker interface for test summary list display. |
ViewModel Interfaces
IMenuViewModel (IMenuViewModel.cs)
public interface IMenuViewModel : IBaseViewModel
{
IMenuView View { get; }
}
Provides access to the associated IMenuView instance.
INavigationViewModel (INavigationViewModel.cs)
public interface INavigationViewModel : IBaseViewModel
{
INavigationView NavigationView { get; }
}
Provides access to the associated INavigationView instance.
IFilterViewModel (IFilterViewModel.cs)
public interface IFilterViewModel : IBaseViewModel
{
IBaseView View { get; }
IBaseViewModel Parent { get; }
object ContextSearchRegion { get; set; }
}
Manages filter/search functionality with:
View: The associated view (typed asIBaseView, notIFilterView)Parent: Reference to the parent view model in the hierarchyContextSearchRegion: A region context for search-related UI composition
ITestSummaryListViewModel (ITestDefinitionListViewModel.cs)
public interface ITestSummaryListViewModel : IBaseViewModel
{
ITestSummaryListView TestSummaryListView { get; }
ObservableCollection<ITestSummary> TestSummaryList { get; set; }
List<ITestSummary> SelectedTestSummaryList { get; set; }
void PublishSelectedTestSummaryList();
}
Manages a collection of test summaries with:
TestSummaryListView: The associated viewTestSummaryList: Bindable collection ofITestSummaryobjectsSelectedTestSummaryList: Tracks user-selected test summariesPublishSelectedTestSummaryList(): Notifies subscribers of selection changes
IMainViewModel (IMainViewModel.cs)
public interface IMainViewModel : IBaseViewModel
{
IBaseView View { get; }
object ContextNavigationRegion { get; set; }
object ContextGraphRegion { get; set; }
object ContextTestsRegion { get; set; }
object ContextGraphsRegion { get; set; }
object ContextLegendRegion { get; set; }
object ContextDiagRegion { get; set; }
object ContextStatsRegion { get; set; }
object ContextCursorRegion { get; set; }
object ContextPropertyRegion { get; set; }
List<FrameworkElement> GetRegions();
}
The primary shell view model with:
View: The main view instance- Nine region context properties for UI composition (all typed as
object) GetRegions(): Returns a list of allFrameworkElementregions
3. Invariants
-
Inheritance Hierarchy: All view interfaces must inherit from
IBaseView. All view model interfaces must inherit fromIBaseViewModel. -
Region Context Types: All region context properties in
IMainViewModelandIFilterViewModelare typed asobject, suggesting late binding or dynamic region assignment. -
Observable Collection Requirement:
TestSummaryListusesObservableCollection<ITestSummary>, implying it must support property change notification for UI binding. -
WPF Dependency:
IMainViewModel.GetRegions()returnsList<FrameworkElement>, indicating a hard dependency on WPF presentation elements.
4. Dependencies
External Dependencies (inferred from imports)
DTS.Common.Base— ProvidesIBaseViewandIBaseViewModelbase interfacesDTS.Common.Interface.TestDefinition— ProvidesITestSummaryinterfaceSystem.Collections.Generic— ForList<T>System.Collections.ObjectModel— ForObservableCollection<T>System.Windows— ForFrameworkElement(WPF)
Consumers
Unknown from source alone. These interfaces are likely consumed by:
- Concrete view implementations (WinForms/WPF user controls)
- Concrete view model classes
- DI container registrations
- Region navigation services
5. Gotchas
-
File/Interface Name Mismatch:
- File
ITestDefinitionListView.cscontains interfaceITestSummaryListView - File
ITestDefinitionListViewModel.cscontains interfaceITestSummaryListViewModel
This naming inconsistency may cause confusion when locating types. The terms "TestDefinition" and "TestSummary" appear to be used interchangeably, which may indicate a historical rename or unclear domain terminology.
- File
-
Inconsistent View Property Types:
IMenuViewModel.ViewreturnsIMenuView(specific type)INavigationViewModel.NavigationViewreturnsINavigationView(specific type)IFilterViewModel.ViewreturnsIBaseView(base type, notIFilterView)IMainViewModel.ViewreturnsIBaseView(base type, notIMainView)
This inconsistency suggests either incomplete refactoring or intentional abstraction at certain levels.
-
Suppressed Namespace Check:
IFilterViewModel.cscontains// ReSharper disable CheckNamespace, indicating possible namespace misalignment that was silenced rather than fixed. -
Region Naming Inconsistency:
IMainViewModelhas bothContextGraphRegion(singular) andContextGraphsRegion(plural). The semantic difference between these is unclear from source alone.