--- 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`