This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelHorizontal/View/DockPanelHorizontalView.xaml.cs
generated_at: "2026-04-16T11:24:16.471740+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5cdf7bb10effcdd4"
---
# Documentation: DockPanelHorizontalView
## 1. Purpose
`DockPanelHorizontalView` is a WPF view component representing a horizontal dock panel within the DTS Viewer application. It serves as the code-behind partial class for `DockPanelHorizontalView.xaml`, providing interaction logic for a horizontally-oriented docking layout element. This module exists to implement the `IDockPanelHorizontalView` interface, enabling it to be consumed by other components that depend on this abstraction.
---
## 2. Public Interface
### `DockPanelHorizontalView` (class)
**Namespace:** `DTS.Viewer`
**Implements:** `IDockPanelHorizontalView`
**Constructor:**
```csharp
public DockPanelHorizontalView()
```
Initializes a new instance of the `DockPanelHorizontalView` class and invokes `InitializeComponent()`, which loads and initializes the associated XAML-defined UI components.
**Note:** The base class is not explicitly declared in this file; it is defined in the corresponding XAML file (`DockPanelHorizontalView.xaml`) as is standard for WPF partial classes.
---
## 3. Invariants
- `InitializeComponent()` must be called exactly once during construction, before the view instance is used. This is enforced by the constructor implementation.
- The class must remain a `partial` class to allow the WPF compiler to merge the XAML-generated code with this code-behind.
- The view must properly implement `IDockPanelHorizontalView`, though the specific interface members are not visible in this source file.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Imported but no direct usage is visible in this file; likely provides base types or utilities.
- `DTS.Common.Interface` — Provides the `IDockPanelHorizontalView` interface that this class implements.
**What depends on this module:**
- Cannot be determined from this source file alone. Consumers would be components that require an `IDockPanelHorizontalView` implementation, likely within the DTS Viewer application's docking infrastructure.
---
## 5. Gotchas
- **Base class is undefined in source:** The parent class of `DockPanelHorizontalView` is declared in the XAML file (typically `UserControl`, `Window`, or a custom base). The inheritance hierarchy cannot be confirmed from this file alone.
- **Interface contract is opaque:** The members required by `IDockPanelHorizontalView` are not visible in this source. It is unclear whether the class should implement additional properties, methods, or events.
- **Unused import:** The `DTS.Common.Base` namespace is imported but no types from it are directly referenced in the visible code. This may indicate historical refactoring or base class inheritance defined in XAML.

View File

@@ -0,0 +1,114 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelHorizontal/ViewModel/DockPanelHorizontalViewModel.cs
generated_at: "2026-04-16T11:24:34.196995+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6bc81faa835eebdc"
---
# DockPanelHorizontalViewModel Documentation
## 1. Purpose
`DockPanelHorizontalViewModel` is a ViewModel component within a WPF/Prism-based application that manages the state and behavior of a horizontal dock panel UI element. It inherits from `BaseViewModel<IDockPanelHorizontalViewModel>` and implements `IDockPanelHorizontalViewModel`, serving as a coordinator between the view layer and the application's event system. The class provides notification/confirmation dialog support via Prism's `InteractionRequest` pattern and subscribes to application-wide `RaiseNotification` events.
---
## 2. Public Interface
### Constructor
```csharp
public DockPanelHorizontalViewModel(
IDockPanelHorizontalView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the View's `DataContext` to itself, creates `NotificationRequest` and `ConfirmationRequest` instances, stores dependencies, and subscribes to the `RaiseNotification` event via the `EventAggregator`.
### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `View` | `IDockPanelHorizontalView` | `public get; private set` | Reference to the associated view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | `public get; private set` | Prism interaction request for displaying notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | `public get; private set` | Prism interaction request for displaying confirmation dialogs. |
| `IsMenuIncluded` | `bool` | `public get; set` | Flag indicating whether a menu is included. |
| `IsNavigationIncluded` | `bool` | `public get; set` | Flag indicating whether navigation is included. |
| `IsBusy` | `bool` | `public get; set` | Flag indicating busy/loading state. |
| `IsDirty` | `bool` | `public get; private set` | Flag indicating unsaved changes state. |
### Events
```csharp
public event PropertyChangedEventHandler PropertyChanged;
```
Standard `INotifyPropertyChanged` event declaration.
### Methods
| Method | Return Type | Behavior |
|--------|-------------|----------|
| `Initialize()` | `void` | Throws `NotImplementedException`. |
| `Initialize(object parameter)` | `void` | Throws `NotImplementedException`. |
| `Activated()` | `void` | Throws `NotImplementedException`. |
| `Cleanup()` | `void` | Throws `NotImplementedException`. |
| `CleanupAsync()` | `Task` | Throws `NotImplementedException`. Marked with `new` keyword. |
| `Initialize(object parameter, object model)` | `void` | Throws `NotImplementedException`. Marked with `new` keyword. |
| `InitializeAsync()` | `Task` | Throws `NotImplementedException`. |
| `InitializeAsync(object parameter)` | `Task` | Throws `NotImplementedException`. |
### Private Methods
```csharp
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
```
Event handler for `RaiseNotification` events. Extracts `Message`, `MessageDetails`, `Image`, and `Title` from the received `NotificationContentEventArgs`, constructs a new `NotificationContentEventArgs` (without title), and raises the `NotificationRequest` with a `Notification` containing the reconstructed content and separate title.
---
## 3. Invariants
- The `View.DataContext` is set to `this` (the ViewModel instance) upon construction and is never changed.
- `NotificationRequest` and `ConfirmationRequest` are always non-null after construction.
- The `RaiseNotification` event subscription is established during construction and remains active for the lifetime of the ViewModel (no unsubscription is visible in the source).
- `IsDirty` can only be modified internally (private setter).
- The `_regionManager` field hides a base class member with the same name (via `new` keyword).
---
## 4. Dependencies
### This Module Depends On
| Namespace | Type(s) Used |
|-----------|--------------|
| `DTS.Common.Base` | `BaseViewModel<T>` |
| `DTS.Common.Events` | `RaiseNotification`, `NotificationContentEventArgs` |
| `DTS.Common.Interface` | `IViewModel`, `IDockPanelHorizontalViewModel` |
| `Microsoft.Practices.Prism.Events` | `IEventAggregator` |
| `Microsoft.Practices.Prism.Interactivity.InteractionRequest` | `InteractionRequest<T>`, `Notification`, `Confirmation` |
| `Microsoft.Practices.Prism.Regions` | `IRegionManager` |
| `Microsoft.Practices.Unity` | `IUnityContainer` |
### What Depends On This Module
Not determinable from source alone. The module implements `IDockPanelHorizontalViewModel`, suggesting consumers depend on that interface rather than the concrete class directly.
---
## 5. Gotchas
1. **Most lifecycle methods are unimplemented**: `Initialize()`, `Initialize(object)`, `Activated()`, `Cleanup()`, `CleanupAsync()`, `Initialize(object, object)`, `InitializeAsync()`, and `InitializeAsync(object)` all throw `NotImplementedException`. This class appears to be a partial implementation or stub.
2. **Method hiding with `new` keyword**: `CleanupAsync()` and `Initialize(object parameter, object model)` use `new` rather than `override`, potentially hiding base class implementations. This may indicate a design inconsistency or versioning artifact.
3. **Field hiding**: The `_regionManager` field is declared with `new`, hiding a base class member. The implications of this depend on the base class implementation.
4. **Redundant object construction in `OnRaiseNotification`**: The handler constructs a new `NotificationContentEventArgs` from the received one, passing `Message`, `MessageDetails`, and `Image` to the constructor. The comment indicates this is intentional ("expects a NotificationContentEventArgsWithoutTitle object"), but the type used is `NotificationContentEventArgs`. Whether this is correct or a bug is unclear from source alone.
5. **No event unsubscription**: There is no visible unsubscription from `RaiseNotification` in any cleanup method. Since `Cleanup()` throws `NotImplementedException`, memory leaks via event subscription are possible if the base class does not handle this.
6. **Unused `Parent` property**: The `Parent` property (type `IViewModel`) is declared but never assigned or used in the visible source.

View File

@@ -0,0 +1,54 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelVertical/View/DockPanelVerticalView.xaml.cs
generated_at: "2026-04-16T11:25:25.151183+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "dd7d632d568da85b"
---
# Documentation: DockPanelVerticalView
## 1. Purpose
`DockPanelVerticalView` is a WPF view component that serves as the code-behind for a XAML-defined vertical dock panel user interface. It implements the `IDockPanelVerticalView` interface, enabling abstraction and likely facilitating dependency injection or MVVM pattern integration within the DTS Viewer application.
---
## 2. Public Interface
### Class: `DockPanelVerticalView`
**Namespace:** `DTS.Viewer`
**Implements:** `IDockPanelVerticalView`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `public DockPanelVerticalView()` | Initializes a new instance of the view and calls `InitializeComponent()` to load the associated XAML layout. |
---
## 3. Invariants
- `InitializeComponent()` must be called exactly once during construction for the XAML-defined UI elements to be instantiated.
- The class is `partial`, indicating it must be paired with a corresponding XAML file (`DockPanelVerticalView.xaml`) that defines the visual layout.
- The view must implement `IDockPanelVerticalView` to satisfy the interface contract (specific interface members are not visible in this source file).
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Imported but no types from this namespace are directly referenced in the visible source.
- `DTS.Common.Interface` — Provides the `IDockPanelVerticalView` interface that this class implements.
- **WPF infrastructure** — Implicit dependency on `System.Windows` (inferred from `InitializeComponent()` pattern and `.xaml.cs` file extension).
### What depends on this module:
- **Not determinable from source alone.** Consumers would typically be parent views, view composition logic, or an IoC container registering this view.
---
## 5. Gotchas
- **Base class not visible:** The source does not explicitly declare a base class. As a `partial` class paired with XAML, the base class is likely defined in the XAML root element (commonly `UserControl` or `Window`). The exact base type cannot be confirmed from this file alone.
- **Empty code-behind:** The class contains no additional logic beyond initialization. Any behavior (event handlers, data binding setup, etc.) is either in the XAML file, a associated ViewModel, or injected elsewhere.
- **Unused import:** `DTS.Common.Base` is imported but no types from it are referenced in the visible code. This may indicate legacy code, a removed feature, or types used only in the XAML portion.

View File

@@ -0,0 +1,103 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelVertical/ViewModel/DockPanelVerticalViewModel.cs
generated_at: "2026-04-16T11:25:25.613899+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0185c1c3d29b204b"
---
# DockPanelVerticalViewModel Documentation
## 1. Purpose
`DockPanelVerticalViewModel` is a ViewModel component for a vertical dock panel UI element within a WPF/Prism-based application. It serves as the data context for `IDockPanelVerticalView`, managing notification/confirmation dialogs and exposing panel configuration state flags. The class inherits from `BaseViewModel<IDockPanelVerticalViewModel>` and integrates with Prism's event aggregation and region management infrastructure.
---
## 2. Public Interface
### Constructor
```csharp
public DockPanelVerticalViewModel(
IDockPanelVerticalView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the View's DataContext to itself, creates interaction requests, and subscribes to the `RaiseNotification` event.
### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `View` | `IDockPanelVerticalView` | `get` | Reference to the associated view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | `get` | Prism interaction request for displaying notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | `get` | Prism interaction request for displaying confirmations. |
| `IsMenuIncluded` | `bool` | `get/set` | Flag indicating whether a menu is included in the panel. |
| `IsNavigationIncluded` | `bool` | `get/set` | Flag indicating whether navigation is included in the panel. |
| `IsBusy` | `bool` | `get/set` | Busy state indicator. |
| `IsDirty` | `bool` | `get` (private set) | Dirty state indicator; read-only externally. |
### Events
```csharp
public event PropertyChangedEventHandler PropertyChanged;
```
Declared but **never invoked** within this class.
### Methods
| Method | Return Type | Behavior |
|--------|-------------|----------|
| `Initialize()` | `void` | Throws `NotImplementedException`. |
| `Initialize(object parameter)` | `void` | Throws `NotImplementedException`. |
| `Initialize(object parameter, object model)` | `void` | Throws `NotImplementedException`. Uses `new` keyword. |
| `InitializeAsync()` | `Task` | Throws `NotImplementedException`. |
| `InitializeAsync(object parameter)` | `Task` | Throws `NotImplementedException`. |
| `Activated()` | `void` | Throws `NotImplementedException`. |
| `Cleanup()` | `void` | Throws `NotImplementedException`. |
| `CleanupAsync()` | `Task` | Throws `NotImplementedException`. Uses `new` keyword. |
---
## 3. Invariants
- **DataContext Binding**: The View's `DataContext` is always set to `this` ViewModel instance upon construction.
- **Event Subscription**: The ViewModel subscribes to `RaiseNotification` event during construction; the subscription lifetime is tied to the EventAggregator's scope.
- **Notification Transformation**: `OnRaiseNotification` transforms `NotificationContentEventArgs` (with title) into `NotificationContentEventArgs` (without title) plus a separate Title string when raising the notification request.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base``BaseViewModel<T>`
- `DTS.Common.Events``RaiseNotification` event, `NotificationContentEventArgs`
- `DTS.Common.Interface``IViewModel`, `IDockPanelVerticalViewModel`, `IDockPanelVerticalView`
- `Microsoft.Practices.Prism.Events``IEventAggregator`
- `Microsoft.Practices.Prism.Interactivity.InteractionRequest``InteractionRequest<T>`, `Notification`, `Confirmation`
- `Microsoft.Practices.Prism.Regions``IRegionManager`
- `Microsoft.Practices.Unity``IUnityContainer`
### What depends on this module:
- **Unclear from source alone** — No consumers are visible in this file. Likely consumed by View implementations and/or DI container registrations.
---
## 5. Gotchas
1. **Incomplete Implementation**: All lifecycle methods (`Initialize`, `InitializeAsync`, `Activated`, `Cleanup`, `CleanupAsync`) throw `NotImplementedException`. This class appears to be a stub or work-in-progress.
2. **Member Hiding**:
- The `_regionManager` field uses `new`, hiding a base class member of the same name.
- `CleanupAsync()` and `Initialize(object parameter, object model)` also use `new`, hiding base implementations rather than overriding them.
3. **Unused `PropertyChanged` Event**: The event is declared but never raised. If property change notification is expected by consumers, it will not function.
4. **Unused `ConfirmationRequest`**: The `ConfirmationRequest` property is instantiated but never raised anywhere in this class.
5. **Unused State Properties**: `IsMenuIncluded`, `IsNavigationIncluded`, `IsBusy`, and `IsDirty` are declared but never read or written within this class (other than being auto-initialized).
6. **Potential Memory Leak**: The `RaiseNotification` event subscription does not appear to be unsubscribed in cleanup (though cleanup throws anyway). If the EventAggregator uses weak references, this may be safe; otherwise, it could cause memory retention issues.

View File

@@ -0,0 +1,38 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/Navigation/View/NavigationView.xaml.cs
generated_at: "2026-04-16T11:25:05.068358+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4b4942c6e8f5eadd"
---
# Documentation: NavigationView
## 1. Purpose
This module defines the code-behind class for the `NavigationView` component within the DTS Viewer application. It serves as a WPF User Control responsible for the visual presentation of navigation elements. Its primary role is to implement the `INavigationView` interface, bridging the gap between the XAML layout definition and the application's navigation logic.
## 2. Public Interface
### Class: `NavigationView`
**Inherits:** `INavigationView` (from `DTS.Common.Interface`)
**Type:** `partial` class
#### Constructor: `NavigationView()`
* **Signature:** `public NavigationView()`
* **Behavior:** Initializes the component. It calls the standard WPF `InitializeComponent()` method, which loads the associated XAML markup (`NavigationView.xaml`) required to render the view.
## 3. Invariants
* **WPF Initialization:** The `InitializeComponent()` method must be called exactly once upon instantiation to ensure the UI elements defined in XAML are created.
* **Interface Compliance:** As this class implements `INavigationView`, it must satisfy the contract defined in `DTS.Common.Interface.INavigationView`. (Note: The specific members of this interface are not visible in the provided source).
## 4. Dependencies
* **Imports:**
* `DTS.Common.Interface`: Used for the `INavigationView` interface.
* **Internal Dependencies:**
* `NavigationView.xaml`: This is a code-beind file; it relies on a corresponding XAML file to define the actual UI structure.
* Implicit WPF Assemblies: Relies on `System.Windows` (specifically `System.Windows.Controls.UserControl` behavior) for `InitializeComponent()`.
## 5. Gotchas
* **Missing Logic Implementation:** The source file contains no explicit implementation of the `INavigationView` interface members. It is unclear from this source alone whether the interface is a marker interface (empty) or if the implementation is expected elsewhere (e.g., via explicit interface implementation not shown, or if the file provided is incomplete).
* **XAML Dependency:** The functionality and visual behavior of this view are entirely dependent on the associated `NavigationView.xaml` file, which is not included here. The C# code acts purely as a bridge.

View File

@@ -0,0 +1,106 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/Navigation/ViewModel/NavigationViewModel.cs
generated_at: "2026-04-16T11:24:52.139730+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a00beb6f74b53389"
---
# Documentation: NavigationViewModel
## 1. Purpose
`NavigationViewModel` is a Prism-based ViewModel responsible for managing the navigation region within the DTS Viewer application's shell. It serves as a mediator between the `INavigationView` and the application's navigation infrastructure, handling notification events via `IEventAggregator` and exposing a `ContextNavigationRegion` property for dynamically setting navigation content. This class inherits from `BaseViewModel<INavigationViewModel>` and implements the `INavigationViewModel` interface.
---
## 2. Public Interface
### Constructor
```csharp
public NavigationViewModel(INavigationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
```
Initializes the view model with its associated view and Prism infrastructure dependencies. Sets the view's `DataContext` to itself, initializes interaction requests, and subscribes to the `RaiseNotification` event.
### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `NavigationView` | `INavigationView` | `get; private set;` | The associated navigation view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | `get; private set;` | Interaction request for displaying notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | `get; private set;` | Interaction request for displaying confirmations. |
| `ContextNavigationRegion` | `object` | `get; set;` | Gets or sets the content of the `NavigationRegion` on the underlying view. Raises `OnPropertyChanged` on set. |
| `HeaderInfo` | `string` | `get;` | Returns the constant string `"NavigationRegion"`. |
| `IsBusy` | `bool` | `get; set;` | **Throws `NotImplementedException`** in both getter and setter. |
| `IsDirty` | `bool` | `get;` | **Throws `NotImplementedException`** in getter. |
### Events
```csharp
public new event PropertyChangedEventHandler PropertyChanged;
```
Hides the base class event. Raised via the private `OnPropertyChanged(string propertyName)` method.
### Methods
| Method | Return Type | Description |
|--------|-------------|-------------|
| `Initialize()` | `void` | Empty override; performs no initialization. |
| `Initialize(object parameter)` | `void` | Sets the `Parent` property by casting `parameter` to `IShellViewModel`. |
| `Activated()` | `void` | **Throws `NotImplementedException`**. |
| `Cleanup()` | `void` | **Throws `NotImplementedException`**. |
| `CleanupAsync()` | `Task` | **Throws `NotImplementedException`**. |
| `InitializeAsync()` | `Task` | **Throws `NotImplementedException`**. |
| `InitializeAsync(object parameter)` | `Task` | **Throws `NotImplementedException`**. |
### Private Methods
```csharp
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
```
Event handler for `RaiseNotification` events. Transforms `NotificationContentEventArgs` into a `NotificationContentEventArgs` (without title) and raises the `NotificationRequest` with separate content and title.
---
## 3. Invariants
- `NavigationView` is assigned in the constructor and never reassigned.
- `Parent` is only set via `Initialize(object parameter)` and must be castable to `IShellViewModel`.
- The `RaiseNotification` event subscription is established at construction time and remains active for the lifetime of the view model.
- `ContextNavigationRegion` assumes the underlying `NavigationView` can be cast to the concrete `NavigationView` type to access `NavigationRegion.Content`.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `BaseViewModel<T>`
- `DTS.Common.Events` — Provides `RaiseNotification` event and `NotificationContentEventArgs`
- `DTS.Common.Interface` — Provides `INavigationViewModel`, `INavigationView`, `IShellViewModel`
- `Microsoft.Practices.Prism.Events` — Provides `IEventAggregator`
- `Microsoft.Practices.Prism.Interactivity.InteractionRequest` — Provides `InteractionRequest<T>`, `Notification`, `Confirmation`
- `Microsoft.Practices.Prism.Regions` — Provides `IRegionManager`
- `Microsoft.Practices.Unity` — Provides `IUnityContainer`
### What depends on this module:
- Cannot be determined from source alone (no consumers visible in this file).
---
## 5. Gotchas
1. **Incomplete Implementation**: Multiple methods (`Activated`, `Cleanup`, `CleanupAsync`, `InitializeAsync`, `InitializeAsync(object parameter)`) and properties (`IsBusy`, `IsDirty`) throw `NotImplementedException`. This class appears to be partially implemented.
2. **Member Hiding**: The `new` keyword is used to hide base class members (`PropertyChanged`, `OnPropertyChanged`, `IsBusy`, `IsDirty`, `CleanupAsync`). This may indicate a design issue or conflict with the base `BaseViewModel<T>` implementation.
3. **Stale XML Documentation**: The constructor's XML comment states "Creates a new instance of the TechnologyDoFrontEditViewModel" — this appears to be a copy-paste error from another view model.
4. **Unsafe Cast in ContextNavigationRegion**: The property directly casts `INavigationView` to the concrete `NavigationView` type:
```csharp
((NavigationView)NavigationView).NavigationRegion.Content
```
This will throw an `InvalidCastException` at runtime if the injected view is not exactly of type `NavigationView`.
5. **Event Transformation Logic**: `OnRaiseNotification` creates a new `NotificationContentEventArgs` from the received event args, extracting `Message`, `MessageDetails`, and `Image` while separating `Title`. This transformation may lose data if additional properties exist on the source event args.