13 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:12:22.294556+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | c067eaab6be3056e |
DTS.Common.Interface Module Documentation
1. Purpose
This module defines a set of core interfaces that establish the contract for the application’s view and view model layer within the DTS (Data Test System) architecture. It enforces a structured separation of concerns using a view/view model pattern, where each view interface (ITabView, IMainView, IMenuView, INavigationView, IShellView, IViewerShellView) corresponds to a specific UI region or shell, and each view model interface (ITabViewModel, IMainViewModel, etc.) exposes its associated view and manages region-specific context (e.g., ContextMainRegion, ContextNavigationRegion). Additionally, it provides infrastructure for plugin discovery (IPluginComponent) and assembly-level metadata (IAssemblyInfo), as well as a detailed contract for data entry pages (IDataPROPage). The module serves as the foundational abstraction layer for UI composition and plugin extensibility.
2. Public Interface
Interfaces (No implementation classes provided; only contracts)
View Interfaces
-
ITabView : IBaseView
Represents a tab-specific view. No additional members beyond inheritance. -
IMainView : IBaseView
Represents the main application view. No additional members beyond inheritance. -
IMenuView : IBaseView
Represents a menu-specific view. No additional members beyond inheritance. -
INavigationView : IBaseView
Represents a navigation-specific view. No additional members beyond inheritance. -
IShellView : IBaseWindow
Represents the top-level shell window view (e.g., main application window). Inherits fromIBaseWindow, notIBaseView. -
IViewerShellView : IBaseView
Represents a dedicated viewer shell view (e.g., for inspection or preview). Inherits fromIBaseView.
View Model Interfaces
-
ITabViewModel : IBaseViewModelITabView View { get; }— Returns the associated tab view instance.
-
IMenuViewModel : IBaseViewModelIMenuView View { get; }— Returns the associated menu view instance.
-
INavigationViewModel : IBaseViewModelINavigationView NavigationView { get; }— Returns the associated navigation view instance.
-
IShellViewModel : IBaseWindowModelIShellView View { get; }— Returns the associated shell view instance.List<FrameworkElement> GetRegions()— Returns a list of named UI regions (e.g., for region injection).object ContextMainRegion { get; set; }— Gets/sets the data context for the main region.
-
IViewerShellViewModel : IBaseViewModelIViewerShellView View { get; }— Returns the associated viewer shell view instance.List<FrameworkElement> GetRegions()— Returns a list of named UI regions.object ContextMainRegion { get; set; }— Gets/sets the data context for the main region.
-
IMainViewModel : IBaseViewModelIBaseView View { get; }— Returns the associated main view instance.object ContextNavigationRegion { get; set; }— Context for the navigation region.object ContextGraphRegion { get; set; }— Context for the graph region.object ContextTestsRegion { get; set; }— Context for the tests region.object ContextGraphsRegion { get; set; }— Context for the graphs region.object ContextLegendRegion { get; set; }— Context for the legend region.object ContextDiagRegion { get; set; }— Context for the diagnostics region.object ContextStatsRegion { get; set; }— Context for the statistics region.object ContextCursorRegion { get; set; }— Context for the cursor region.object ContextPropertyRegion { get; set; }— Context for the property region.List<FrameworkElement> GetRegions()— Returns a list of named UI regions.
Plugin & Metadata Interfaces
-
IPluginComponentstring ProgId { get; }— Programmatic identifier used to instantiate the plugin component.
-
IAssemblyImageAttribute : Attribute(abstract base class)string AssemblyName { get; }string AssemblyGroup { get; }eAssemblyRegion AssemblyRegion { get; }BitmapImage AssemblyImage { get; }BitmapImage GetAssemblyImage()string GetAssemblyName()string GetAssemblyGroup()eAssemblyRegion GetAssemblyRegion()Type GetAttributeType()
Applied via[assembly: ImageAttribute(...)]at assembly level.
-
IAssemblyNameAttribute : Attribute(abstract base class)string AssemblyName { get; }string GetAssemblyName()
Applied via[assembly: TextAttribute(...)]at assembly level.
Data Entry Page Interface
-
IDataPROPage : INotifyPropertyChangedVisibility TestSetupChangeButtonVisible { get; set; }Visibility AutomaticModeStatusVisible { get; set; }string PageName { get; set; }ImageSource PageImage { get; set; }bool IsAdd { get; set; }bool UsesModifyEnhancements { get; set; }string EditIDString { get; set; }string AddIDString { get; set; }string ModifiedObjectName { get; set; }bool AutomaticProgression { get; set; }bool RecoveryDownloadMode { get; set; }string UniqueId { get; }string GetName()long GetID()void SetID(long id)Color TileColor { get; }void SetTileColor(Color c)void SavePage(object obj)string CurrentSearchTerm { get; set; }void ClearSearchTerm()void SetEnabled(bool bEnable)bool UsesNAVControl { get; set; }bool UsesSearchControl { get; set; }bool UsesSelectControl { get; set; }void VerifyProgress(object o)void SaveAndExit()void RefreshButtonPressed()void SetDoneButtonIsEnabled(bool bEnabled)void SetBackButtonIsEnabled(bool bEnabled)void DoneButtonPress()bool HasBackButton { get; set; }bool HasRefreshButton { get; set; }bool HasCancelButton { get; set; }bool HasSaveButton { get; set; }void SetCancelEnabled(bool bEnabled)bool HasNextButton { get; set; }Color ContentBackgroundColor { get; set; }object MainContent { get; set; }ContentControl GetMainContentControl()void SetReturning()bool Validate(ref List<string> errors, ref List<string> warnings, bool displayWindow)bool OKToProceed()void FormClosing(Action OnComplete = null)bool ControlInOnSetActive { get; set; }void OnSetActive()void UnSet()void SetCurrentItem(object o)void SetupPageAvailable()
-
DataProPageProperties(enum)
Lists all properties onIDataPROPagethat are considered stateful and observable (e.g., for binding or change tracking). Includes:
UsesModifyEnhancements,TestSetupChangeButtonVisible,AutomaticModeStatusVisible,PageName,PageImage,IsAdd,EditIDString,AddIDString,ModifiedObjectName,AutomaticProgression,RecoveryDownloadMode,UsesNAVControl,UsesSearchControl,UsesSelectControl,HasBackButton,HasRefreshButton,HasCancelButton,HasSaveButton,HasNextButton,ContentBackgroundColor,MainContent,GenerateReportsVisible.
3. Invariants
- View-ViewModel Pairing: Each view model interface (
*ViewModel) exposes a strongly-typedViewproperty (orNavigationViewinINavigationViewModel) that must return the corresponding view interface instance. - Region Context Management:
IShellViewModelandIViewerShellViewModelexposeContextMainRegion;IMainViewModelexposes multiple named region contexts (ContextNavigationRegion,ContextGraphRegion, etc.). These must be set to valid data contexts before region binding occurs. - Region List Consistency:
GetRegions()methods acrossIShellViewModel,IViewerShellViewModel, andIMainViewModelmust return a list ofFrameworkElementinstances representing named regions (e.g., for Prism-style region injection). - Unique Page Identity:
IDataPROPage.UniqueIdmust be non-null and stable for the lifetime of the page instance. - Page State Validation:
Validate()must populateerrorsandwarningslists and returnfalseif validation fails;OKToProceed()must reflect whether the page is in a state to proceed (e.g., after validation). - Assembly Attributes:
ImageAttributeandTextAttributeare assembly-level attributes (AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)), meaning each assembly may define at most one of each. - Inheritance Hierarchy: All view interfaces inherit from
IBaseView(orIBaseWindowforIShellView), and all view model interfaces inherit fromIBaseViewModel(orIBaseWindowModelforIShellViewModel). This implies a strict hierarchy enforced by the base layer (DTS.Common.Base).
4. Dependencies
Dependencies of this module:
DTS.Common.Base— Provides base interfaces (IBaseView,IBaseViewModel,IBaseWindow,IBaseWindowModel) and likely core types likeeAssemblyRegion.System.Windows— Required forFrameworkElement,BitmapImage,Color,ContentControl, andVisibility.System.Collections.Generic,System.ComponentModel,System.Windows.Media— Used inIDataPROPageandIAssemblyInfo.
Dependencies on this module:
- UI composition modules (e.g., shell, navigation, plugin loaders) — These depend on the view/view model interfaces to wire up regions and bind contexts.
- Plugin infrastructure — Uses
IPluginComponent.ProgIdfor dynamic instantiation. - Assembly metadata consumers — Use
IAssemblyImageAttribute/IAssemblyNameAttribute(via reflection) to discover plugin metadata. - Data entry page host frameworks — Rely on
IDataPROPageto manage page lifecycle, validation, and UI state.
5. Gotchas
INavigationViewModel.NavigationViewis misnamed: Despite the interface name,INavigationViewModelexposesINavigationView NavigationView { get; }, notINavigationView View { get; }. This breaks the naming consistency of other view models (e.g.,ITabViewModel.View).IShellViewinherits fromIBaseWindow, notIBaseView: This is inconsistent with all other view interfaces and may indicate a design distinction for top-level windows vs. nested views.IAssemblyImageAttributevs.ImageAttribute:IAssemblyImageAttributeis an interface, whileImageAttributeis its abstract base class. Implementers must inherit fromImageAttribute, not implementIAssemblyImageAttributedirectly.GenerateReportsVisibleinDataProPagePropertiesenum but not declared inIDataPROPage: The enum includesGenerateReportsVisible, but no corresponding property or method exists inIDataPROPage. This is likely an oversight or incomplete refactoring.- Missing
IBaseView/IBaseWindowdefinitions: Since the base interfaces are inDTS.Common.Base, their contract (e.g., whetherIBaseViewhas aDataContextproperty) is unknown and critical to understanding the full interface semantics. - No documentation for
eAssemblyRegion: The enumeAssemblyRegionis referenced inIAssemblyImageAttributebut not defined in this module; its values and semantics are unknown. IAssemblyImageAttribute.GetType()andGetAttributeType(): Both methods exist inIAssemblyImageAttributeandImageAttribute. Their purpose is unclear —GetType()is standardobject.GetType(), butGetAttributeType()likely returns the concrete attribute type (e.g.,typeof(MyImageAttribute)). This duplication may cause confusion.IDataPROPagehas many mutable properties: The interface exposes numeroussetproperties (e.g.,PageName,PageImage,HasBackButton), implying runtime mutability. This may conflict with MVVM best practices if not carefully managed by view model synchronization.
None identified from source alone beyond the above.