8.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:02:01.201668+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | a20032db9e159be1 |
Viewer
Documentation: Viewer Interface Module (DTS.Common.Interface)
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 enforces a consistent separation of concerns between UI presentation (views) and presentation logic (view models), with each view model exposing its corresponding view and, where applicable, additional context or data regions used for composition (e.g., region navigation or data binding). These interfaces collectively support a region-based UI composition pattern (likely using Prism or similar), enabling dynamic assembly of views into predefined regions of a shell window.
2. Public Interface
Interfaces (Views)
| Interface | Inherits | Description |
|---|---|---|
IMainView |
IBaseView |
Represents the main application window or top-level view. |
IMenuView |
IBaseView |
Represents the menu bar or navigation menu UI component. |
IFilterView |
IBaseView |
Represents the filter/search UI component (e.g., search box, filter controls). |
INavigationView |
IBaseView |
Represents the navigation pane or region (e.g., tree view, list of test suites). |
ITestSummaryListView |
IBaseView |
Represents the list view displaying test summary items. (Note: Interface name is ITestSummaryListView, but file is named ITestDefinitionListView.cs.) |
Interfaces (View Models)
| Interface | Inherits | Key Members | Description |
|---|---|---|---|
IMenuViewModel |
IBaseViewModel |
IMenuView View { get; } |
Provides access to the IMenuView. |
INavigationViewModel |
IBaseViewModel |
INavigationView NavigationView { get; } |
Provides access to the INavigationView. (Note: XML doc says "Shell View", but property is NavigationView.) |
IFilterViewModel |
IBaseViewModel |
IBaseView View { get; }IBaseViewModel Parent { get; }object ContextSearchRegion { get; set; } |
Provides access to the filter/search view, its parent view model, and a region object used for search-related context (e.g., region name or container). |
ITestSummaryListViewModel |
IBaseViewModel |
ITestSummaryListView TestSummaryListView { get; }ObservableCollection<ITestSummary> TestSummaryList { get; set; }List<ITestSummary> SelectedTestSummaryList { get; set; }void PublishSelectedTestSummaryList() |
Manages the list of test summaries, selected items, and exposes a method to publish the selected list (likely for event publication or binding). (Note: Interface name is ITestSummaryListViewModel, but file is named ITestDefinitionListViewModel.cs.) |
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() |
Core view model for the main window. Exposes multiple region context objects (likely used for region registration/naming in a region manager) and a method to retrieve the actual FrameworkElement instances corresponding to those regions. |
Note on naming inconsistencies: Several interface names differ from their corresponding file names (e.g.,
ITestSummaryListViewinITestDefinitionListView.cs). This is preserved as-is per the source.
3. Invariants
- All view interfaces (
IMainView,IMenuView, etc.) inherit fromIBaseView, implying a common base contract for all views (e.g.,IViewmarker or base interface). - All view model interfaces inherit from
IBaseViewModel, implying a common base contract for all view models. - Every view model interface exposes a
View-typed property (eitherView,NavigationView,TestSummaryListView, etc.) that returns the concrete view instance it is bound to. IFilterViewModelandIMainViewModelexposeobject-typed properties for region contexts (e.g.,ContextSearchRegion,ContextNavigationRegion, etc.). These are likely used to store region names, region manager references, or region containers — but the actual type is not constrained by the interface.IMainViewModel.GetRegions()returns aList<FrameworkElement>, presumably the actual UI elements corresponding to the named regions (e.g., for programmatic manipulation or region registration).ITestSummaryListViewModelmanages two collections:TestSummaryList(observable, for binding) andSelectedTestSummaryList(plain list, likely for bulk operations or publishing). ThePublishSelectedTestSummaryList()method likely triggers an event or message.
4. Dependencies
Dependencies of this module:
DTS.Common.Base— All interfaces depend onIBaseViewandIBaseViewModelfrom this namespace.System.Collections.Generic,System.Collections.ObjectModel— Used inITestSummaryListViewModel.System.Windows— Used inIMainViewModelforFrameworkElement.
Dependencies on this module:
- Any module implementing or consuming views/view models (e.g., UI shell, region controllers, test definition logic).
- Likely consumed by:
- A Prism-based shell application (for region management).
- View model factories or dependency injection containers.
- Test definition or analysis modules (e.g., via
ITestSummaryreferences).
Notable:
ITestSummaryListViewModelreferencesITestSummary(fromDTS.Common.Interface.TestDefinition), indicating a dependency on theTestDefinitionsub-namespace.
5. Gotchas
-
Naming mismatch between files and interfaces:
ITestDefinitionListView.csdefinesITestSummaryListView.ITestDefinitionListViewModel.csdefinesITestSummaryListViewModel.
This may cause confusion during code navigation or refactoring.
-
Ambiguous region context types:
Region context properties (e.g.,ContextNavigationRegion,ContextSearchRegion) are typed asobject. Their intended runtime type (e.g.,string,RegionManager,FrameworkElement, or custom region metadata) is not specified in this module. Consumers must infer or document externally. -
Inconsistent XML documentation:
INavigationViewModel.NavigationViewis documented as "Gets the Shell View", but the property is namedNavigationView.IFilterViewModel.Viewis documented as "Gets the Search View", but the property is namedView(generic).
This may mislead developers during debugging or onboarding.
-
No explicit contract for region registration:
WhileIMainViewModel.GetRegions()returnsFrameworkElements, there is no indication of how these are registered with a region manager (e.g., Prism’sRegionManager.SetRegionName()). This logic is likely implemented elsewhere. -
Missing
usingforSystem.Collections.Genericin some files:
INavigationView.csandIFilterView.csdo not explicitly importSystem.Collections.Generic, but this is likely handled byIBaseViewor global usings — not a functional issue, but worth noting for maintainability. -
No methods defined on view interfaces:
All view interfaces are empty markers (aside from inheritance), implying view logic is entirely in view models — consistent with MVVM, but may require external documentation for view-specific behaviors (e.g., event handlers, attached behaviors).
None identified beyond the above.