Files
DP44/docs/ai/DataPRO/Modules/TestSetups/Diagnostics/ViewModel.md
2026-04-17 14:55:32 -04:00

38 lines
1.4 KiB
Markdown

---
source_files:
- DataPRO/Modules/TestSetups/Diagnostics/ViewModel/DiagnosticsViewModel.cs
generated_at: "2026-04-17T16:47:10.374442+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e1ab887d53b828fa"
---
# DiagnosticsViewModel Documentation
## 1. Purpose
`DiagnosticsViewModel` is a Prism-based ViewModel for the Diagnostics module within the TestSetups subsystem. It serves as the presentation logic layer for diagnostic UI, managing view binding, user notifications, and event-driven communication with other application components. The class is designed as a shared singleton (MEF `CreationPolicy.Shared`) and acts as a bridge between the `IDiagnosticsTreeView` and the application's event infrastructure.
---
## 2. Public Interface
### Constructor
```csharp
public DiagnosticsViewModel(
IDiagnosticsTreeView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the `TreeView`'s `DataContext` to itself, creates interaction requests, and subscribes to `RaiseNotification` and `BusyIndicatorChangeNotification` events.
---
### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `View` | `IDiagnosticsTreeView` | get/set | DiagnosticsTreeView reference (appears separate from `TreeView`). |
| `TreeView` | `IDiagnosticsTreeView` | get/set | The diagnostics tree view; `DataContext`