Files
DP44/enriched-partialglm/Common/DTS.CommonCore/Interface/DTS.Viewer.md
2026-04-17 14:55:32 -04:00

10 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.CommonCore/Interface/DTS.Viewer/ITabView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IDiagView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ITestsView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IStatsView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ICursorView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ITabItemView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IPropertyView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerShellView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IGraphPropertyView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelVerticalView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelHorizontalView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/GroupChannelReadCalcDelegate.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ITabViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IDiagViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IStatsViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ICursorViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ITestsViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IPropertyViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerModule.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IPSDReportModule .cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IGraphPropertyViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelVerticalViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelHorizontalViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ITabItemViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerShellViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IMainLiteView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IMainViewerView.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/ISelectedDataViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IMainLiteViewModel.cs
Common/DTS.CommonCore/Interface/DTS.Viewer/IMainViewModel.cs
2026-04-16T12:14:43.492195+00:00 zai-org/GLM-5-FP8 1 fed47436f7c090f0

DTS.Common.Interface Viewer Module Documentation

1. Purpose

This module defines the contract layer for the DTS Viewer application's presentation components. It establishes a Model-View-ViewModel (MVVM) architecture through a comprehensive set of interfaces for views, view models, and modules. The interfaces enable loose coupling between UI components and their controllers, supporting a modular, plugin-based architecture built on Microsoft Prism. This abstraction layer allows different concrete implementations of views and view models to be swapped without affecting dependent code.


2. Public Interface

View Interfaces

All view interfaces inherit from IBaseView (defined in DTS.Common.Base) and are currently marker interfaces with no additional members:

Interface Description
ITabView Marker interface for tab views
IDiagView Marker interface for diagnostic views
ITestsView Marker interface for test views
IStatsView Marker interface for statistics views
ICursorView Marker interface for cursor views
IViewerView Marker interface for viewer views
ITabItemView Marker interface for individual tab item views
IPropertyView Marker interface for property views
IViewerShellView Marker interface for the main shell view
IGraphPropertyView Marker interface for graph property views
IDockPanelVerticalView Marker interface for vertical dock panel views
IDockPanelHorizontalView Marker interface for horizontal dock panel views

IMainLiteView

public interface IMainLiteView : IBaseView
{
    StackPanel MainShell { get; set; }
    ContentControl MainRegion { get; set; }
    ContentControl NavigationRegion { get; set; }
    ContentControl HorizontalTabRegion { get; set; }
    ContentControl VerticalTabRegion { get; set; }
}

Exposes WPF region controls for the "Lite" version of the main view.

IMainViewerView

public interface IMainViewerView : IBaseView
{
    // All members commented out in source
}

Marker interface for the main viewer view. Region properties are commented out in the source.


ViewModel Interfaces

All view model interfaces inherit from IBaseViewModel (defined in DTS.Common.Base).

Standard ViewModel Interfaces

Each provides a View property returning its corresponding view interface:

Interface View Property Type
ITabViewModel ITabView View { get; }
IDiagViewModel IDiagView View { get; }
IStatsViewModel IStatsView View { get; }
ICursorViewModel ICursorView View { get; }
ITestsViewModel ITestsView View { get; }
IViewerViewModel IViewerView View { get; }
IPropertyViewModel IPropertyView View { get; }
IGraphPropertyViewModel IGraphPropertyView View { get; }
IDockPanelVerticalViewModel IDockPanelVerticalView View { get; }
IDockPanelHorizontalViewModel IDockPanelHorizontalView View { get; }

ITabItemViewModel

public interface ITabItemViewModel : IBaseViewModel
{
    ITabItemView View { get; }
    ITabViewModel Parent { get; }
}

Represents a tab item with a reference to its parent ITabViewModel.

IViewerShellViewModel

public interface IViewerShellViewModel : IBaseViewModel
{
    IViewerShellView View { get; }
    List<FrameworkElement> GetRegions();
    object ContextMainRegion { get; set; }
}

The shell view model providing region management and main region context.

IMainLiteViewModel

public interface IMainLiteViewModel : IBaseViewModel
{
    IMainView View { get; }
    object ContextMainRegion { get; set; }
    object ContextNavigationRegion { get; set; }
    object ContextHorizontalTabRegion { get; set; }
    object ContextVerticalTabRegion { get; set; }
    List<FrameworkElement> GetRegions();
}

Note: Returns IMainView (not IMainLiteView), which is not defined in the provided source files.

IMainViewerViewModel

public interface IMainViewerViewModel : IBaseViewModel
{
    IBaseView View { get; }
    object ContextMainRegion { get; set; }
    object ContextNavigationRegion { get; set; }
    object ContextHorizontalTabRegion { get; set; }
    object ContextVerticalTabRegion { get; set; }
    List<FrameworkElement> GetRegions();
}

Returns IBaseView directly rather than a specific view interface.


Module Interfaces

IViewerModule

public interface IViewerModule : IModule
{
    void StartSession(bool standalone, string pluginFolder = "");
}

Defines a Prism module for the viewer with session initialization capability.

IPSDReportModule

public interface IPSDReportModule : IModule
{
    void StartSession(bool standalone, string pluginFolder = "");
}

Defines a Prism module for PSD reporting with identical session initialization signature.


Other Types

SetReadCalcProgressValueDelegate

public delegate void SetReadCalcProgressValueDelegate(string message = "", double value = -1D);

A delegate type for reporting progress during read/calculation operations. Default parameters allow calling with no arguments.

ISelectedDataViewModel

public interface ISelectedDataViewModel
{
    string SelectedDataFolder { get; set; }
    string SelectedDataFile { get; set; }
    void SelectAndIncludeDataFile(string file);
}

Does NOT inherit from IBaseViewModel. Manages data file selection with a method to both select and include a file as a test. The XML comment references bug "16158 Browse button on View Data tab not functional."


3. Invariants

  • All view interfaces (except ISelectedDataViewModel) must inherit from IBaseView.
  • All view model interfaces (except ISelectedDataViewModel) must inherit from IBaseViewModel.
  • Each standard view model interface must expose a read-only View property returning its corresponding view interface type.
  • ITabItemViewModel.Parent must return a valid ITabViewModel instance (parent-child relationship is expected).
  • StartSession on module interfaces must be called to initialize the module with explicit standalone mode specification.
  • Region context properties (ContextMainRegion, ContextNavigationRegion, etc.) are expected to be set by the framework or controlling code before views are rendered.

4. Dependencies

External Dependencies

Dependency Usage
DTS.Common.Base Provides IBaseView and IBaseViewModel base interfaces
Microsoft.Practices.Prism.Modularity Provides IModule interface for module definitions
System.Windows Provides FrameworkElement for region management
System.Windows.Controls Provides StackPanel, ContentControl for view composition

Downstream Dependencies

Unclear from source alone. These interfaces are contract definitions; concrete implementations and consumers are not present in the provided files. The naming convention suggests implementations exist in a DTS.Viewer assembly or namespace.


5. Gotchas

  1. IMainLiteViewModel.View returns IMainView — This interface references IMainView, which is not defined in any of the provided source files. This may be a typo for IMainLiteView or a separate interface.

  2. IMainViewerView has all members commented out — The interface exists but all its region properties are commented out. This may indicate incomplete refactoring or an abandoned change.

  3. ISelectedDataViewModel does not follow the pattern — Unlike all other view model interfaces, this one does not inherit from IBaseViewModel and has no View property. It appears to be a utility interface rather than a true MVVM view model.

  4. Inconsistent XML comments — Some interfaces have XML documentation (e.g., ITabViewModel, ITabItemViewModel), while others do not. Some comments are copy-pasted incorrectly (e.g., IViewerViewModel says "Gets the Tests View" but returns IViewerView).

  5. SetReadCalcProgressValueDelegate naming mismatch — The filename is GroupChannelReadCalcDelegate.cs but the delegate is named SetReadCalcProgressValueDelegate.

  6. IPSDReportModule filename has trailing space — The filename is IPSDReportModule .cs (note the space before the extension).