8.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:22:43.523517+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | d625778ef337fcd6 |
Viewer Interface Module Documentation
1. Purpose
This module defines a set of interfaces that establish the contract for the view and view model layers in a modular UI architecture, specifically for a test definition and analysis application. It establishes a standardized structure for core UI regions—main view, menu, navigation, filter, and test summary list—by defining their corresponding view (*View) and view model (*ViewModel) interfaces, all inheriting from base interfaces in DTS.Common.Base. The module serves as a contract layer enabling decoupled UI composition, likely used in a region-based navigation framework (e.g., Prism), where views and view models are loosely coupled and injected into named regions of a shell application.
2. Public Interface
View Interfaces (all inherit IBaseView):
-
IMainView
Represents the main shell/window view. No additional members beyondIBaseView. -
IMenuView
Represents the menu view (e.g., top-level menu bar or context menu container). No additional members beyondIBaseView. -
IFilterView
Represents the filter/search view (e.g., search bar, filter controls). No additional members beyondIBaseView. -
INavigationView
Represents the navigation view (e.g., side navigation panel). No additional members beyondIBaseView. -
ITestSummaryListView(note: interface name mismatch with file name)
Represents the list view for test definitions/summaries. No additional members beyondIBaseView.
⚠️ File declaresITestDefinitionListView, but interface is namedITestSummaryListView.
View Model Interfaces (all inherit IBaseViewModel):
-
IMenuViewModelIMenuView View { get; }— Returns the associated menu view instance.
-
INavigationViewModelINavigationView NavigationView { get; }— Returns the associated navigation view instance.
-
IFilterViewModelIBaseView View { get; }— Returns the associated filter/search view instance.IBaseViewModel Parent { get; }— Reference to the parent view model (likelyIMainViewModel).object ContextSearchRegion { get; set; }— Holds a reference to the UI region (e.g., content control) where search/filter results are displayed.
-
ITestSummaryListViewModel(note: interface name mismatch with file name)ITestSummaryListView TestSummaryListView { get; }— Returns the associated test summary list view.ObservableCollection<ITestSummary> TestSummaryList { get; set; }— Collection of test summaries displayed in the list.List<ITestSummary> SelectedTestSummaryList { get; set; }— Currently selected test summaries.void PublishSelectedTestSummaryList()— Triggers publication of the selected list (e.g., for downstream processing or event broadcasting).
-
IMainViewModelIBaseView View { get; }— Returns the main shell view instance.object ContextNavigationRegion { get; set; }— Reference to the navigation region container.object ContextGraphRegion { get; set; }— Reference to the primary graph region container.object ContextTestsRegion { get; set; }— Reference to the tests region container.object ContextGraphsRegion { get; set; }— Reference to the graphs region container (plural).object ContextLegendRegion { get; set; }— Reference to the legend region container.object ContextDiagRegion { get; set; }— Reference to the diagnostics region container.object ContextStatsRegion { get; set; }— Reference to the statistics region container.object ContextCursorRegion { get; set; }— Reference to the cursor/overlay region container.object ContextPropertyRegion { get; set; }— Reference to the property inspection region container.List<FrameworkElement> GetRegions()— Returns a list of all region containers asFrameworkElementinstances.
3. Invariants
- All view interfaces (
*View) must be implemented by UI controls (e.g.,UserControl,Window) that inherit fromIBaseView. - All view model interfaces (
*ViewModel) must be implemented by view models that inherit fromIBaseViewModel. - Each view model must expose a reference to its corresponding view via the
View-typed property (e.g.,INavigationViewModel.NavigationView,IFilterViewModel.View). IFilterViewModelrequires aParentreference, implying a hierarchical view model structure.IMainViewModeldefines a fixed set of named region contexts (Context*Region)—these are expected to be non-null after initialization and must correspond to actual UI regions in the shell.GetRegions()must return a list containing all region containers, including those not explicitly named (e.g.,Context*Regionproperties), to support generic region enumeration.
4. Dependencies
Dependencies on this module:
DTS.Common.Base: All interfaces inherit fromIBaseViewandIBaseViewModel, implying this module depends on the base layer for core contracts.DTS.Common.Interface.TestDefinition:ITestSummaryListViewModelreferencesITestSummary, indicating a dependency on theTestDefinitionsub-namespace (likely defining test metadata models).System.Collections.Generic,System.Collections.ObjectModel: Used for list/collection properties inITestSummaryListViewModel.System.Windows:IMainViewModel.GetRegions()returnsFrameworkElement, indicating a WPF-specific dependency.
Dependencies of this module:
- This module is consumed by higher-level UI composition layers (e.g., shell application, region managers, or DI containers) that instantiate and wire views/view models.
- Likely consumed by implementations in
DTS.App.*or similar application projects.
5. Gotchas
- Interface name mismatch:
- File
ITestDefinitionListView.csdeclares interfaceITestSummaryListView(notITestDefinitionListView). - File
ITestDefinitionListViewModel.csdeclares interfaceITestSummaryListViewModel(notITestDefinitionListViewModel).
This may cause confusion during code navigation or refactoring.
- File
- Ambiguous region semantics:
Context*Regionproperties are typed asobject, with no compile-time guarantee of their expected type (e.g.,ContentControl,Grid). Consumers must assume runtime type compatibility. - Missing
INavigationViewvs.NavigationViewnaming:
INavigationViewModel.NavigationViewreturnsINavigationView, but the interface is namedINavigationView(notINavigationView), which is consistent—but the region is namedContextNavigationRegion, notContextShellRegion, suggesting potential naming inconsistency with other regions. - No explicit region registration:
The interfaces define region references but no mechanism to register or validate region names—consumers must rely on external configuration (e.g., XAML region names matching property names likeContextTestsRegion). IFilterViewModel.ContextSearchRegion:
The nameContextSearchRegionsuggests search-specific behavior, but the interface is namedIFilterView—this may indicate legacy naming or incomplete refactoring.- No documentation for
GetRegions()behavior:
It is unclear whetherGetRegions()includes only the explicitly namedContext*Regionproperties or also other regions; implementation may vary.
None identified beyond the above.