58 lines
2.7 KiB
Markdown
58 lines
2.7 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- DataPRO/Modules/TestSetups/TestSetupsList/ViewModel/TestSetupsListViewModel.cs
|
||
|
|
generated_at: "2026-04-17T16:00:45.456136+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "790589951db7c0bc"
|
||
|
|
---
|
||
|
|
|
||
|
|
# TestSetupsListViewModel Documentation
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
`TestSetupsListViewModel` is the presentation logic component for the Test Setups List module in a WPF/Prism-based application. It manages the display, filtering, sorting, and selection of `ITestSetup` objects, serving as the intermediary between the view (`ITestSetupsListView`) and the underlying data. The class implements the MVVM pattern with `INotifyPropertyChanged` support and integrates with Prism's event aggregation and region management systems for decoupled communication across the application.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### Constructor
|
||
|
|
```csharp
|
||
|
|
public TestSetupsListViewModel(ITestSetupsListView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||
|
|
```
|
||
|
|
Initializes the view model, sets the view's DataContext, creates interaction requests, and subscribes to `RaiseNotification` and `BusyIndicatorChangeNotification` events.
|
||
|
|
|
||
|
|
### Properties
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `View` | `ITestSetupsListView` | The associated view instance. |
|
||
|
|
| `NotificationRequest` | `InteractionRequest<Notification>` | Used to raise notification dialogs. |
|
||
|
|
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Used to raise confirmation dialogs. |
|
||
|
|
| `SelectedTestSetupIndex` | `int` | Index of the currently selected test setup. Default: `-1`. |
|
||
|
|
| `SelectedTestSetupItems` | `BulkObservableCollection<ITestSetup>` | Collection of selected test setup items. Fires `TestSetupsListTestSetupSelectedEvent` on change. |
|
||
|
|
| `TestSetups` | `ITestSetup[]` | The filtered/sorted array of test setups displayed to the user. |
|
||
|
|
| `IsDirty` | `bool` | Indicates whether there are unsaved changes. Has private setter only. |
|
||
|
|
| `IsBusy` | `bool` | Controls busy indicator state. Raises `PropertyChanged` on change. |
|
||
|
|
| `IsMenuIncluded` | `bool` | Indicates whether menu is included. Raises `PropertyChanged` on change. |
|
||
|
|
| `IsNavigationIncluded` | `bool` | Indicates whether navigation is included. Raises `PropertyChanged` on change. |
|
||
|
|
| `ListViewId` | `string` | Returns constant string `"TestSetupsListView"`. |
|
||
|
|
|
||
|
|
### Events
|
||
|
|
```csharp
|
||
|
|
public event PropertyChangedEventHandler PropertyChanged
|
||
|
|
```
|
||
|
|
Standard `INotifyPropertyChanged` event for data binding.
|
||
|
|
|
||
|
|
### Methods
|
||
|
|
|
||
|
|
```csharp
|
||
|
|
public void OnPropertyChanged(string propertyName)
|
||
|
|
```
|
||
|
|
Invokes the `PropertyChanged` event for the specified property.
|
||
|
|
|
||
|
|
```csharp
|
||
|
|
public void ClearAllFilters()
|
||
|
|
```
|
||
|
|
Clears all field-specific search terms from `_
|