10 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:21:13.869650+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | fed47436f7c090f0 |
DTS.Viewer
Documentation: Viewer Interface Module (DTS.Common.Interface – Viewer Subspace)
1. Purpose
This module defines a set of interfaces that collectively establish the contract for the view layer of the DTS Viewer application, following a MVVM (Model-View-ViewModel) pattern. It provides strongly-typed abstractions for UI components (e.g., tabs, panels, properties, diagnostics, statistics), their corresponding view models, and shell-level hosting structures. These interfaces serve as the foundational abstraction layer between UI implementation (e.g., WPF views) and business logic (view models and modules), enabling modular composition, testability, and decoupled development. The interfaces are grouped into view and view model pairs (e.g., ITabView/ITabViewModel) and are used by Prism-based modules (IViewerModule, IPSDReportModule) to manage application lifecycle and region context.
2. Public Interface
View Interfaces (all inherit IBaseView)
| Interface | Description |
|---|---|
ITabView |
Represents a tab container view. |
IDiagView |
Represents a diagnostics view. |
ITestsView |
Represents a tests view. |
IStatsView |
Represents a statistics view. |
ICursorView |
Represents a cursor view (likely for time/frequency cursor markers). |
IViewerView |
Represents the main viewer view (note: IViewerViewModel incorrectly documents its view as ITestsView in summary; actual property is IViewerView). |
ITabItemView |
Represents an individual tab item within a tab container. |
IPropertyView |
Represents a property display/edit view. |
IViewerShellView |
Represents the top-level shell/container view for the viewer application. |
IGraphPropertyView |
Represents a graph-specific property view. |
IDockPanelVerticalView |
Represents a vertically-oriented dock panel view. |
IDockPanelHorizontalView |
Represents a horizontally-oriented dock panel view. |
IMainLiteView |
Extends IBaseView and exposes named WPF regions (MainShell, MainRegion, NavigationRegion, HorizontalTabRegion, VerticalTabRegion) for layout composition. |
IMainViewerView |
Extends IBaseView; currently has no members (commented-out region properties suggest possible future or legacy use). |
ViewModel Interfaces (all inherit IBaseViewModel)
| Interface | Description |
|---|---|
ITabViewModel |
ViewModel for ITabView; exposes View property of type ITabView. |
IDiagViewModel |
ViewModel for IDiagView; exposes View property of type IDiagView. |
ITestsViewModel |
ViewModel for ITestsView; exposes View property of type ITestsView. |
IStatsViewModel |
ViewModel for IStatsView; exposes View property of type IStatsView. |
ICursorViewModel |
ViewModel for ICursorView; exposes View property of type ICursorView. |
IViewerViewModel |
ViewModel for IViewerView; exposes View property of type IViewerView. |
IPropertyViewModel |
ViewModel for IPropertyView; exposes View property of type IPropertyView. |
IGraphPropertyViewModel |
ViewModel for IGraphPropertyView; exposes View property of type IGraphPropertyView. |
IDockPanelVerticalViewModel |
ViewModel for IDockPanelVerticalView; exposes View property of type IDockPanelVerticalView. |
IDockPanelHorizontalViewModel |
ViewModel for IDockPanelHorizontalView; exposes View property of type IDockPanelHorizontalView. |
ITabItemViewModel |
ViewModel for ITabItemView; exposes View (ITabItemView) and Parent (ITabViewModel). |
IViewerShellViewModel |
ViewModel for IViewerShellView; exposes View, ContextMainRegion, and GetRegions() (returns List<FrameworkElement>). |
IMainLiteViewModel |
ViewModel for IMainView (note: interface declares IMainView, but no IMainView interface is defined in this file set); exposes View, region contexts (ContextMainRegion, etc.), and GetRegions(). |
IMainViewerViewModel |
ViewModel for IBaseView; exposes View, region contexts, and GetRegions(). |
ISelectedDataViewModel |
Manages selected data file/folder state; exposes SelectedDataFolder, SelectedDataFile, and SelectAndIncludeDataFile(string file). |
Delegate
| Delegate | Signature | Description |
|---|---|---|
SetReadCalcProgressValueDelegate |
delegate void(string message = "", double value = -1D) |
Used to report progress during read/calculation operations. |
Module Interfaces (Prism IModule)
| Interface | Description |
|---|---|
IViewerModule |
Extends IModule; defines StartSession(bool standalone, string pluginFolder = "") for initializing the viewer module. |
IPSDReportModule |
Extends IModule; defines StartSession(bool standalone, string pluginFolder = "") for initializing the PSD report module. |
3. Invariants
- All view interfaces inherit
IBaseView— implies a common base contract for UI components (thoughIBaseViewitself is not defined here). - All view model interfaces inherit
IBaseViewModel— implies a common base contract for view models. - Each
IXXXViewModelinterface exposes a read-onlyViewproperty of typeIXXXView— enforcing a strict one-to-one pairing between view and view model. ITabItemViewModelis the only interface with a non-Viewproperty (Parent: ITabViewModel) — indicating hierarchical containment.- Region context properties (
ContextMainRegion,ContextNavigationRegion, etc.) are of typeobject— allowing flexible assignment of arbitrary view instances or data contexts. GetRegions()returnsList<FrameworkElement>— used to register or query WPF UI regions (e.g., for Prism region management).ISelectedDataViewModelis not tied to a view/view model pair — it is a standalone interface for data selection state, likely consumed by multiple view models.
4. Dependencies
Internal Dependencies
DTS.Common.Base: All interfaces depend onIBaseViewandIBaseViewModel(defined elsewhere inDTS.Common.Base).Microsoft.Practices.Prism.Modularity:IViewerModuleandIPSDReportModuledepend on Prism’sIModuleinterface.
External Dependencies
- WPF (
System.Windows,System.Windows.Controls): Used inIMainLiteView,IMainViewerView,IViewerShellViewModel,IMainLiteViewModel, andIMainViewerViewModelviaFrameworkElement,StackPanel,ContentControl.
Consumers (Inferred)
- Prism-based modules (
IViewerModule,IPSDReportModule) likely implement these interfaces to register views and view models with the shell. - View implementations (e.g., WPF
UserControls) will implement theI*Viewinterfaces. - ViewModel implementations will implement the
I*ViewModelinterfaces and bind to their corresponding views. ISelectedDataViewModelis likely injected into or consumed by multiple view models (e.g.,ITestsViewModel,IViewerViewModel) to manage data selection state.
5. Gotchas
IViewerViewModelsummary comment is misleading: The XML doc says/// Gets the Tests View., but the property isIViewerView View { get; }. This is likely a copy-paste error in documentation.IMainLiteViewModelreferencesIMainView, but noIMainViewinterface is defined in this file set — onlyIMainLiteViewandIMainViewerViewexist. This may indicate an incomplete or missing interface definition.IMainViewerViewhas no members: Its region properties are commented out, suggesting it may be a placeholder or legacy artifact.- No explicit validation or ordering guarantees: Interfaces define what is exposed, not how or when (e.g., no guarantees about
SelectAndIncludeDataFileatomicity or thread-safety). - Delegate
SetReadCalcProgressValueDelegatehas no documented usage context: Its purpose is clear (progress reporting), but its integration point (e.g., which view model exposes it) is not specified here. - No
usingdirectives forSystem.Collections.GenericorSystem.Windowsin some files — implies reliance on global aliases or implicit usings (e.g., viaDTS.Common.Base), but this is not visible in the source.
None identified beyond the above.