init
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/ChannelCodes/ChannelCodesViewChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/ChannelCodes/ChannelCodeCommittedEvent.cs
|
||||
generated_at: "2026-04-16T02:48:23.376026+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ada2b2e64b345605"
|
||||
---
|
||||
|
||||
# ChannelCodes
|
||||
|
||||
## Documentation: Channel Codes Event Definitions
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used for inter-module communication related to channel code management in the DTS system. Specifically, `ChannelCodesViewChangedEvent` signals when the user switches between different view modes (e.g., list, grid) for channel codes UI, while `ChannelCodeCommittedEvent` broadcasts when one or more channel codes have been successfully saved or submitted by a user, including metadata about the operation (e.g., code value, name, type, and user privileges). These events decouple UI components (e.g., views, view models) from business logic or persistence layers involved in channel code handling.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ChannelCodesViewChangedEvent`
|
||||
- **Type**: `class` (inherits from `CompositePresentationEvent<DTS.Common.Enums.IsoViewMode>`)
|
||||
- **Payload**: `DTS.Common.Enums.IsoViewMode`
|
||||
- **Behavior**: A Prism event used to notify subscribers when the current view mode for the channel codes UI has changed. Subscribers receive the new `IsoViewMode` value (e.g., `List`, `Grid`, etc., per the enum definition).
|
||||
|
||||
#### `ChannelCodeCommittedEvent`
|
||||
- **Type**: `class` (inherits from `CompositePresentationEvent<ChannelCodeCommittedEventArgs[]>`)
|
||||
- **Payload**: `ChannelCodeCommittedEventArgs[]` (array of committed channel code entries)
|
||||
- **Behavior**: A Prism event published after one or more channel codes are committed (e.g., saved to a backend or cache). Subscribers receive an array of `ChannelCodeCommittedEventArgs`, each describing a single committed code.
|
||||
|
||||
#### `ChannelCodeCommittedEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `ChannelCodeType`: `ChannelEnumsAndConstants.ChannelCodeType` — immutable; indicates the category or domain of the channel code (e.g., `Network`, `Device`, `Service`).
|
||||
- `Code`: `string` — immutable; the actual code string (e.g., `"NET_001"`).
|
||||
- `Name`: `string` — immutable; the human-readable name/description of the code (e.g., `"Primary Network"`).
|
||||
- `CanUserCommitChannelCodes`: `bool` — immutable; `true` if the user submitting the event has write permissions for channel codes; `false` otherwise.
|
||||
- **Constructor**:
|
||||
```csharp
|
||||
public ChannelCodeCommittedEventArgs(
|
||||
ChannelEnumsAndConstants.ChannelCodeType channelCodeType,
|
||||
string code,
|
||||
string name,
|
||||
bool canUserCommitChannelCodes)
|
||||
```
|
||||
Initializes a new instance with the specified values. All properties are set at construction and remain read-only thereafter.
|
||||
|
||||
### 3. Invariants
|
||||
- `ChannelCodeCommittedEventArgs` instances are **immutable** after construction: all properties have `private set` accessors and are assigned only in the constructor.
|
||||
- `ChannelCodeCommittedEvent` always carries an array of `ChannelCodeCommittedEventArgs`, even if empty (i.e., no null payload is implied by the source, but callers may choose to publish with zero-length arrays).
|
||||
- The `CanUserCommitChannelCodes` flag reflects the *submitting user’s* privilege at the time of commit, not necessarily the current user’s privilege (e.g., in multi-user or background scenarios).
|
||||
- `IsoViewMode` values are constrained to the members defined in `DTS.Common.Enums.IsoViewMode` (not shown in source; assumed to be an enum defined elsewhere).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies on other modules/types**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation)
|
||||
- `DTS.Common.Enums` (for `IsoViewMode`)
|
||||
- `DTS.Common.Enums.Channels` (for `ChannelEnumsAndConstants.ChannelCodeType`)
|
||||
- **Depended on by**:
|
||||
- UI components (e.g., views/view models) that need to react to view mode changes or channel code commits (e.g., refreshing displays, updating audit logs, enforcing permissions).
|
||||
- Likely consumed by modules handling channel code persistence, audit logging, or UI state synchronization.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Namespace inconsistency**: `ChannelCodesViewChangedEvent` resides in `DTS.Common.Events`, while `ChannelCodeCommittedEvent` and its args are in `DTS.Common.Events.ChannelCodes`. This may cause confusion during subscription (e.g., `eventAggregator.GetEvent<ChannelCodesViewChangedEvent>().Subscribe(...)`)—ensure correct namespace resolution.
|
||||
- **No validation guarantees**: The source provides no indication that `Code` or `Name` are non-null/non-empty; callers must validate inputs before publishing `ChannelCodeCommittedEvent`.
|
||||
- **Privilege flag semantics**: `CanUserCommitChannelCodes` is set at event publication time and may become stale if user permissions change between commit and event handling. Handlers should not assume this flag reflects the *current* user state.
|
||||
- **Array payload**: `ChannelCodeCommittedEvent` uses an array, implying batch commits are supported. Handlers must iterate the array and not assume a single item.
|
||||
- **No error handling**: The event is named `CommittedEvent`, suggesting success only. There is no corresponding failure/error event defined here; error handling must be separate.
|
||||
- **Missing documentation for `IsoViewMode`**: The actual values/states of `IsoViewMode` are not visible in the source, so behavior tied to specific modes (e.g., `List` vs `Grid`) cannot be fully specified.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DASFactory/DASConfigurationEvent.cs
|
||||
generated_at: "2026-04-16T02:48:38.970688+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "923244ee6528d02e"
|
||||
---
|
||||
|
||||
# DASFactory
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines the `DASConfigurationEvent` class, a Prism-based event used to propagate DAS (Device Abstraction Service) configuration-related notifications within the application. Specifically, it signals when configuration data is blank or missing—such as during an emergency download scenario where DAS must fall back to on-disk XML configuration files (per issue #17872). It serves as a decoupled communication mechanism for components that need to react to configuration state changes, particularly in fallback or error-handling workflows.
|
||||
|
||||
### 2. **Public Interface**
|
||||
- **`DASConfigurationEvent`**
|
||||
- **Type**: `class` (inherits from `CompositePresentationEvent<IDASConfigurationArg>`)
|
||||
- **Behavior**: A Prism event token used for publishing and subscribing to configuration notifications. The payload is of type `IDASConfigurationArg`, which (based on the interface import) is expected to carry configuration state details (e.g., file paths, validation status, or error context). No additional methods or properties are defined in this file.
|
||||
|
||||
### 3. **Invariants**
|
||||
- The event *always* carries a payload of type `IDASConfigurationArg` (as enforced by its base class `CompositePresentationEvent<T>`).
|
||||
- Subscribers must handle `null` payloads if `IDASConfigurationArg` allows it (source does not specify nullability constraints for the argument).
|
||||
- The event is intended *only* for configuration-related notifications (per the summary), and its usage should be limited to scenarios involving blank/missing configurations (e.g., emergency downloads).
|
||||
- No ordering guarantees or delivery semantics are specified beyond Prism’s default `CompositePresentationEvent` behavior (thread-safe, background dispatch, etc.).
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Imports/References**:
|
||||
- `DTS.Common.Interface.DASFactory.IDASConfigurationArg` (interface defining the configuration argument contract)
|
||||
- `Microsoft.Practices.Prism.Events.CompositePresentationEvent<T>` (Prism event infrastructure)
|
||||
- **Depended upon by**:
|
||||
- Any module/component that needs to respond to DAS configuration anomalies (e.g., emergency download logic, configuration validators, UI status indicators).
|
||||
- *Not inferred*: Concrete implementations of `IDASConfigurationArg` or publishers of this event are not visible in this file.
|
||||
|
||||
### 5. **Gotchas**
|
||||
- The event name `DASConfigurationEvent` is generic, but its documented purpose is narrow (blank/missing configs only). Misuse for *general* configuration changes could break assumptions in subscribers.
|
||||
- The `IDASConfigurationArg` interface is imported but not defined here; its contract (e.g., properties like `IsBlank`, `FilePath`, `ErrorCode`) must be verified in `DTS.Common.Interface.DASFactory` to avoid misinterpretation of payload semantics.
|
||||
- No explicit error-handling guidance is provided for subscribers (e.g., whether to log, retry, or abort).
|
||||
- The comment references issue #17872; historical context for this event’s creation may be critical for correct usage but is not embedded in the source.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/SaveReportToCSVRequestedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/SaveReportToPDFRequestedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:24.002572+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "32eb4ff533778e72"
|
||||
---
|
||||
|
||||
# Reports
|
||||
|
||||
## Documentation: Report Export Request Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used to signal user requests to export report data to external file formats—specifically CSV and PDF. These events serve as decoupled communication mechanisms within the application’s event-driven architecture, allowing view models or UI components to request export operations without direct coupling to the export implementation logic (e.g., a report service or controller). They are part of the `DTS.Common.Events` namespace and are intended for use in Prism-based WPF or similar XAML-based UI frameworks.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`SaveReportToCSVRequestedEvent`**
|
||||
*Type:* `class` (inherits from `CompositePresentationEvent<SaveReportToCSVRequestedEventArgs>`)
|
||||
*Behavior:* A Prism event token used to publish and subscribe to requests to save a report to CSV format. Subscribers handle the actual export logic.
|
||||
|
||||
- **`SaveReportToCSVRequestedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `Directory` (`string`): The target directory path where the CSV file should be saved.
|
||||
- `ParentVM` (`IBaseViewModel`): A reference to the view model initiating the request, typically used for context (e.g., to access report data or UI state).
|
||||
|
||||
- **`SaveReportToPDFRequestedEvent`**
|
||||
*Type:* `class` (inherits from `CompositePresentationEvent<SaveReportToPDFRequestedEventArgs>`)
|
||||
*Behavior:* A Prism event token used to publish and subscribe to requests to save a report to PDF format. Subscribers handle the actual export logic.
|
||||
|
||||
- **`SaveReportToPDFRequestedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `Directory` (`string`): The target directory path where the PDF file should be saved.
|
||||
- `ParentVM` (`IBaseViewModel`): A reference to the view model initiating the request, typically used for context (e.g., to access report data or UI state).
|
||||
|
||||
### 3. Invariants
|
||||
- Both event argument classes (`SaveReportToCSVRequestedEventArgs`, `SaveReportToPDFRequestedEventArgs`) require that `Directory` and `ParentVM` be non-null at the time the event is published, though the source does not enforce this explicitly.
|
||||
- The `Directory` property is expected to represent a valid, writable file system path (conventionally validated by the subscriber).
|
||||
- `ParentVM` must implement `IBaseViewModel` (from `DTS.Common.Base`), implying the event publisher has access to a view model instance conforming to that interface.
|
||||
- No ordering or timing guarantees are specified—events are published asynchronously via Prism’s `CompositePresentationEvent` mechanism.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `DTS.Common.Base` (provides `IBaseViewModel`)
|
||||
- `Microsoft.Practices.Prism.Events` (provides `CompositePresentationEvent<T>`)
|
||||
- **Dependencies *on* this module:**
|
||||
- Any component (e.g., view models, services) that needs to trigger a report export must subscribe to or publish these events.
|
||||
- Export handlers (e.g., services in other modules) must subscribe to these events to perform the actual file generation.
|
||||
- No other modules in the provided source reference these events, so their consumers are external to this file set.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in `Directory` semantics:** The property name is `Directory`, but export operations typically require a *full file path* (e.g., `C:\Reports\export.csv`). It is unclear whether subscribers are expected to append a filename, or if the filename is derived from `ParentVM` or other context.
|
||||
- **No cancellation or error propagation mechanism:** The events carry no way to signal success/failure or allow cancellation (e.g., via `CancellationToken` or result object), which may complicate error handling in subscribers.
|
||||
- **No metadata about the report:** Neither event argument includes information about *which* report to export (e.g., report ID, data source, or filter criteria). This data must be inferred from `ParentVM`, increasing coupling and risk of inconsistency.
|
||||
- **No thread-safety guarantees:** As Prism’s `CompositePresentationEvent` uses the UI thread by default for subscriptions (unless `ThreadOption.Background` is specified), subscribers may need to marshal work off the UI thread, but this is not documented or enforced here.
|
||||
- **Historical duplication:** The near-identical structure of `SaveReportToCSVRequestedEvent` and `SaveReportToPDFRequestedEvent` suggests potential for refactoring into a generic `SaveReportRequestedEvent<T>` (if Prism and project constraints allow), but no such generic exists in the source.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportGRMSValuesUpdatedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportSettingsChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:24.419139+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8cae978d3c87299f"
|
||||
---
|
||||
|
||||
# PowerSpectralDensity
|
||||
|
||||
## Documentation: PSD Report Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used to communicate changes in Power Spectral Density (PSD) report state within the DTS Viewer application. Specifically, it provides events for notifying subscribers when GRMS (Root Mean Square acceleration) summary values have been updated (`PSDReportGRMSValuesUpdatedEvent`) and when PSD report configuration settings have changed (`PSDReportSettingsChangedEvent`). These events facilitate decoupled UI updates and state synchronization across view models and services in a Prism-based MVVM architecture.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `PSDReportGRMSValuesUpdatedEvent`
|
||||
- **Type**: `CompositePresentationEvent<PSDReportGRMSValuesUpdatedEventArg>`
|
||||
- **Behavior**: A Prism event used to publish notifications when GRMS summary values for a PSD report have been recalculated or updated. Subscribers receive an `PSDReportGRMSValuesUpdatedEventArg` instance containing the updated values and the originating view model.
|
||||
|
||||
#### `PSDReportGRMSValuesUpdatedEventArg`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `IChannelGRMSSummary[] Values`: Array of GRMS summary data per channel.
|
||||
- `IBaseViewModel ParentVM`: Reference to the view model that triggered the event (e.g., the report view model).
|
||||
|
||||
#### `PSDReportSettingsChangedEvent`
|
||||
- **Type**: `CompositePresentationEvent<PSDReportSettingsChangedEventArg>`
|
||||
- **Behavior**: A Prism event used to publish notifications when PSD report settings (e.g., frequency range, window type, overlap) have been modified. Subscribers receive an `PSDReportSettingsChangedEventArg` instance containing the updated settings model and the originating view model.
|
||||
|
||||
#### `PSDReportSettingsChangedEventArg`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `IPSDReportSettingsModel Model`: The updated PSD report settings model.
|
||||
- `IBaseViewModel ParentVM`: Reference to the view model that triggered the event.
|
||||
|
||||
### 3. Invariants
|
||||
- `Values` in `PSDReportGRMSValuesUpdatedEventArg` must be non-null when the event is published (though the array may be empty).
|
||||
- `Model` in `PSDReportSettingsChangedEventArg` must be non-null when the event is published.
|
||||
- `ParentVM` in both argument types is expected to be non-null and represent the view model instance associated with the report that triggered the event.
|
||||
- Events are published via Prism’s `EventAggregator`; subscribers must subscribe on the appropriate thread context (e.g., UI thread) if UI updates are required.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies on other modules**:
|
||||
- `DTS.Common.Base` (provides `IBaseViewModel`)
|
||||
- `DTS.Common.Interface` (provides `IChannelGRMSSummary`, `IPSDReportSettingsModel`)
|
||||
- `Microsoft.Practices.Prism.Events` (provides `CompositePresentationEvent<T>`)
|
||||
- **Depended on by**:
|
||||
- View models and services that consume or produce PSD report data (e.g., report generation logic, UI components like `PSDReportViewModel`).
|
||||
- Likely consumed by modules handling report display, export, or analysis (not specified in source).
|
||||
|
||||
### 5. Gotchas
|
||||
- **No validation or immutability guarantees**: The argument classes expose public setters for all properties. Subscribers must assume values may be mutated after event publication unless explicitly copied.
|
||||
- **No event payload versioning**: Changes to `IChannelGRMSSummary` or `IPSDReportSettingsModel` interfaces may break subscribers without warning.
|
||||
- **Ambiguity in `ParentVM` semantics**: While `ParentVM` is included, its exact role (e.g., originator, owner, or context) is not documented in this file; callers must infer usage from surrounding code.
|
||||
- **No documentation of event subscription/unsubscription patterns**: It is unclear whether events are intended for one-time use, persistent subscriptions, or scoped lifetime (e.g., per-view).
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/RefreshTestRequestEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/ShowT0CursorEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/TestModificationChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/SetUseZeroForUnfilteredEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/TestModificationEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/ShiftT0Event.cs
|
||||
generated_at: "2026-04-16T02:49:56.440589+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "42735a65c478074f"
|
||||
---
|
||||
|
||||
# TestModification
|
||||
|
||||
## Documentation: Test Modification Event Definitions
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based event types used for communication within the DTS Viewer component related to test modification operations. These events facilitate decoupled UI and data layer interactions—such as refreshing test data, toggling or shifting the T0 cursor, updating filter behavior, and signaling when a test has been modified—enabling reactive updates across modules without tight coupling. All events inherit from `CompositePresentationEvent<T>` (Prism’s pub/sub mechanism), indicating they are intended for cross-view or cross-module communication in a WPF/Prism-based application.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
| Event / Type | Signature | Behavior |
|
||||
|--------------|-----------|----------|
|
||||
| `RefreshTestRequestEvent` | `public class RefreshTestRequestEvent : CompositePresentationEvent<string> { }` | Payload is a `string` representing the **Test ID**. Subscribers use this to refresh the UI/data for the specified test. |
|
||||
| `ShowT0CursorEvent` | `public class ShowT0CursorEvent : CompositePresentationEvent<bool> { }` | Payload is a `bool`. `true` to show the T0 cursor, `false` to hide it. |
|
||||
| `TestModificationChangedEvent` | `public class TestModificationChangedEvent : CompositePresentationEvent<ITestModificationModel> { }` | Payload is an `ITestModificationModel`. Signals that the current test modification state (e.g., metadata, parameters) has changed. |
|
||||
| `SetUseZeroForUnfilteredEvent` | `public class SetUseZeroForUnfilteredEvent : CompositePresentationEvent<bool> { }` | Payload is a `bool`. Controls whether `0` (true) or `P` (false) is displayed in the isocode filter field when modifying an isocode from a filter. |
|
||||
| `TestModificationEvent` | `public class TestModificationEvent : CompositePresentationEvent<TestModificationArgs> { }` | Payload is a `TestModificationArgs`. Raised whenever a test is modified by the viewer (e.g., user edits metadata or parameters). Triggers downstream regeneration of ROIs (e.g., by DataPro). |
|
||||
| `TestModificationArgs` | `public class TestModificationArgs { public string DataSetDirectory { get; } public string TestId { get; } public TestModificationArgs(string dtsFilePath, string testId) { ... } }` | Encapsulates context for a test modification: `dtsFilePath` → `DataSetDirectory`, and `testId`. |
|
||||
| `ShiftT0Event` | `public class ShiftT0Event : CompositePresentationEvent<ShiftT0EventArguments> { }` | Payload is a `ShiftT0EventArguments`. Requests shifting the T0 time (cursor) either by absolute time offset or by sample/step count. |
|
||||
| `ShiftT0EventArguments` | `public class ShiftT0EventArguments { public double T0Time { get; } public bool IsInitialization { get; } public int T0Steps { get; } public bool IsKeyPress { get; }` | Contains shift parameters: <br>• `T0Time`: Absolute time value (used in one constructor). <br>• `T0Steps`: Number of steps/samples to shift (used in the other constructor). <br>• `IsInitialization`: Whether this shift is part of initial setup. <br>• `IsKeyPress`: Whether the shift was triggered by a keyboard event (left/right arrow). |
|
||||
|
||||
> **Note**: Two distinct constructors for `ShiftT0EventArguments` exist:
|
||||
> - One accepting `(double t0, bool isInitialization)` → sets `T0Time`, `IsInitialization`; `T0Steps = 0`, `IsKeyPress = false`.
|
||||
> - One accepting `(int steps, bool isInitialization, bool isKeyPress)` → sets `T0Steps`, `IsInitialization`, `IsKeyPress`; `T0Time = 0D`.
|
||||
|
||||
### 3. Invariants
|
||||
- All events are **non-interactive** (i.e., they carry data only; no return values or side effects in the event class itself).
|
||||
- Payload types are strictly typed:
|
||||
- `RefreshTestRequestEvent` → `string` (Test ID)
|
||||
- `ShowT0CursorEvent` → `bool`
|
||||
- `TestModificationChangedEvent` → `ITestModificationModel` (interface, not concrete type)
|
||||
- `SetUseZeroForUnfilteredEvent` → `bool`
|
||||
- `TestModificationEvent` → `TestModificationArgs`
|
||||
- `ShiftT0Event` → `ShiftT0EventArguments`
|
||||
- `TestModificationArgs.TestId` and `TestModificationArgs.DataSetDirectory` are **immutable** (`private set;`).
|
||||
- In `ShiftT0EventArguments`, `T0Time` and `T0Steps` are mutually exclusive: only one is non-zero/non-default per instance.
|
||||
- `IsInitialization` and `IsKeyPress` are independent flags; both may be `false` (e.g., programmatic shifts not triggered by user input or initialization).
|
||||
|
||||
### 4. Dependencies
|
||||
- **External Dependency**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library) — required for `CompositePresentationEvent<T>`.
|
||||
- **Internal Dependency**:
|
||||
- `DTS.Common.Interface.ITestModificationModel` — referenced in `TestModificationChangedEvent`. This interface must be defined elsewhere in the codebase (not included here).
|
||||
- **Inferred Usage**:
|
||||
- Events are likely published by the DTS Viewer (e.g., test editing UI) and consumed by modules like DataPro (for ROI regeneration), cursor rendering components, or filter UI logic.
|
||||
- No direct consumers are listed in the source; usage must be inferred from comments (e.g., `TestModificationEvent` is used by DataPro to regenerate ROI).
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguous payload semantics**:
|
||||
- `DataSetDirectory` in `TestModificationArgs` is initialized from `dtsFilePath`, but its name suggests a *directory* while the parameter is named `dtsFilePath` (which may be a full file path). Clarify whether this expects a directory or file path.
|
||||
- `ShiftT0EventArguments` has two constructors with overlapping parameters (`isInitialization`) but different semantics. Callers must ensure correct constructor is used—mixing them may lead to `T0Time = 0` when a time shift was intended.
|
||||
- **Missing validation**:
|
||||
- No validation is present in `ShiftT0EventArguments` constructors (e.g., `steps` could be negative; `T0Time` could be negative). Behavior for invalid values is undefined.
|
||||
- **Namespace quirk**:
|
||||
- `// ReSharper disable CheckNamespace` is present in multiple files, suggesting intentional deviation from folder-based namespace conventions. Ensure build/linting rules accommodate this.
|
||||
- **No documentation on event subscription/unsubscription patterns**:
|
||||
- Since these are Prism events, subscribers must manage thread affinity (e.g., `ThreadOption.PublisherThread` vs `UIThread`) explicitly—this is not documented here.
|
||||
- **No deprecation notices**:
|
||||
- The comment for `TestModificationEvent` ("this event is called currently whenever...") suggests it may be legacy or in flux. No indication of planned replacement or migration path.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,85 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/ResetZoomChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorShowChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorsClearChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorShowMinMaxChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorsAlailableChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/SaveToPDFRequestedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/ChartAxisChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/ChartOptionsChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:11.916711+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "16f84af1488883a8"
|
||||
---
|
||||
|
||||
# ViewerChartOptions
|
||||
|
||||
## Documentation: Viewer Chart Options Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based pub/sub events used to communicate state changes and user requests related to chart viewer options in the DTS system. These events enable decoupled communication between chart UI components (e.g., view models, views, controllers) and backend logic—specifically for toggling cursor/zoom behavior, axis adjustments, chart configuration changes, and export actions. The events are part of the `DTS.Common.Events` namespace and rely on the `CompositePresentationEvent<T>` base class from Prism for cross-thread subscription and publication.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
All event classes are *payload-only*—they carry no methods or properties beyond their inherited event infrastructure. Each inherits from `CompositePresentationEvent<TPayload>` and defines a strongly-typed payload.
|
||||
|
||||
| Event Class | Payload Type | Description |
|
||||
|-------------|--------------|-------------|
|
||||
| `ResetZoomChangedEvent` | `bool` | Indicates that the reset-zoom state has changed (e.g., whether reset-zoom is enabled or active). |
|
||||
| `CursorShowChangedEvent` | `bool` | Indicates that the visibility state of the primary cursor has changed. |
|
||||
| `CursorsClearChangedEvent` | `bool` | Indicates that the state of the “clear cursors” action has changed (e.g., whether clearing is allowed or requested). |
|
||||
| `CursorShowMinMaxChangedEvent` | `bool` | Indicates that the state of displaying min/max values alongside cursors has changed. |
|
||||
| `CursorsAlailableChangedEvent` | `bool` | *Note: Typo in class name—intended `CursorsAvailableChangedEvent`.* Indicates that the availability state of cursors has changed (e.g., whether cursors are enabled for interaction). |
|
||||
| `SaveToPDFRequestedEvent` | `string` | Signals a request to save the current chart to PDF. The payload is a string—likely a suggested filename or export path. |
|
||||
| `ChartAxisChangedEvent` | `ChartAxisChangedEventArg` | Signals that one chart axis (X or Y) has been adjusted. Payload contains updated axis bounds and the parent view model. |
|
||||
| `ChartOptionsChangedEvent` | `ChartOptionsChangedEventArg` | Signals that high-level chart options (e.g., type, model settings) have changed. Payload includes the updated model, chart type, and parent view model. |
|
||||
|
||||
#### Payload Types
|
||||
|
||||
| Type | Fields | Description |
|
||||
|------|--------|-------------|
|
||||
| `ChartAxisChangedEventArg` | `IBaseViewModel ParentVM`, `string Axis`, `double MinValue`, `double MaxValue` | Encapsulates axis change details. `Axis` is likely `"X"` or `"Y"`. |
|
||||
| `ChartOptionsChangedEventArg` | `IBaseViewModel ParentVM`, `IChartOptionsModel Model`, `string ChartType` | Encapsulates chart configuration change. `Model` holds serializable chart settings; `ChartType` identifies the visualization mode (e.g., `"Line"`, `"Bar"`). |
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **Event naming convention**: All event classes end with `ChangedEvent` (for state changes) or `RequestedEvent` (for user-initiated actions).
|
||||
- **Payload semantics**:
|
||||
- Boolean events (`ResetZoomChangedEvent`, `CursorShowChangedEvent`, etc.) use `true`/`false` to represent *on/off* or *enabled/disabled* states—**not** toggling actions.
|
||||
- `SaveToPDFRequestedEvent` payload is a `string`—interpreted as a *request* (not a confirmation), so the payload likely represents a *target* (e.g., filename or path), not a result.
|
||||
- **ParentVM usage**: In `ChartAxisChangedEventArg` and `ChartOptionsChangedEventArg`, `ParentVM` is non-null and identifies the originating view model—enabling subscribers to scope responses to specific chart instances.
|
||||
- **No validation in event classes**: Payload objects contain no validation logic; subscribers must enforce constraints (e.g., `MinValue ≤ MaxValue`).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` → Provides `CompositePresentationEvent<T>`.
|
||||
- `DTS.Common.Base` → Provides `IBaseViewModel` interface.
|
||||
- `DTS.Common.Interface` → Provides `IChartOptionsModel` interface.
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module/view model/view that needs to react to chart viewer option changes (e.g., chart rendering logic, cursor management, export handlers).
|
||||
- Specifically:
|
||||
- Subscribers to `ChartAxisChangedEvent` likely update axis scales in chart controls.
|
||||
- Subscribers to `SaveToPDFRequestedEvent` likely trigger PDF export workflows.
|
||||
- UI components (e.g., toolbar buttons) may publish `ResetZoomChangedEvent`/`CursorShowChangedEvent` to reflect toggle states.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Typo in class name**: `CursorsAlailableChangedEvent` is misspelled (`Alailable` instead of `Available`). This is preserved in the source and must be respected in code.
|
||||
- **Misleading XML comments**: All events (except `SaveToPDFRequestedEvent`) have a comment `/// <summary>The Data Folder changed event.</summary>`, which is incorrect and likely copy-paste error. This does not affect runtime behavior but may confuse developers.
|
||||
- **Ambiguous boolean semantics**: The meaning of `true`/`false` in boolean events is not standardized in the source. For example, `CursorShowChangedEvent` with `true` could mean *“show cursors”* or *“cursor visibility changed to visible”*—subscribers must infer intent from context or external documentation.
|
||||
- **No event grouping**: Related events (e.g., cursor toggles) are defined separately, requiring subscribers to subscribe to each individually. No composite event or enum-based alternative is provided.
|
||||
- **No deprecation markers**: Despite the typo, no `[Obsolete]` attribute or migration path is indicated.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerFilter/FilterParameterChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:40.608427+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b412d168caf7b62d"
|
||||
---
|
||||
|
||||
# ViewerFilter
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines a Prism-based event (`FilterParameterChangedEvent`) used to broadcast changes to filter parameters within the DTS Viewer component. It enables decoupled communication between view models (implementing `IBaseViewModel`) and other subscribers (e.g., filter controllers, data aggregators) when a filter parameter is modified—typically in response to user interaction in the UI. The event carries metadata about *who* triggered the change (`Requester`) and *which* parameter changed (`Param`), supporting dynamic, reactive filtering logic without tight coupling.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
- **`FilterParameterArgs`**
|
||||
A data carrier class for the event payload.
|
||||
- `IBaseViewModel Requester { get; set; }` — The view model instance that initiated the filter parameter change.
|
||||
- `string Param { get; set; }` — The name or identifier of the filter parameter that changed.
|
||||
|
||||
- **`FilterParameterChangedEvent`**
|
||||
A Prism `CompositePresentationEvent<FilterParameterArgs>` subclass used to publish and subscribe to filter parameter change notifications.
|
||||
- Inherits standard Prism event methods: `Subscribe(...)`, `Publish(...)`, `Unsubscribe(...)`, etc.
|
||||
- Payload type is `FilterParameterArgs`.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- `Requester` **must not be null** when publishing the event (implied by the XML comment “Filter requester” and typical Prism usage patterns), though the source does not enforce this at runtime.
|
||||
- `Param` **must be non-null and non-empty** for meaningful filtering, though again, no explicit validation is present in the source.
|
||||
- The event is *asynchronous* by default (as `CompositePresentationEvent` supports thread marshaling), but no specific threading guarantees are documented.
|
||||
- No ordering guarantees are provided for subscribers—multiple subscribers may receive the event in arbitrary order.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseViewModel` — Defines the contract for the `Requester`.
|
||||
- `Microsoft.Practices.Prism.Events.CompositePresentationEvent<T>` — Prism’s event aggregation infrastructure.
|
||||
- **Used by**:
|
||||
- Any component in the DTS Viewer module (e.g., filter controls, view models, data services) that needs to notify others of filter parameter changes.
|
||||
- Likely consumed by filter logic handlers (e.g., in a `FilterService` or `ViewerViewModel`) to re-query or re-render data.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No null-safety**: The class does not validate or guard against `null` values for `Requester` or `Param`. Subscribers must handle potential `NullReferenceException`s if these are not validated before publishing.
|
||||
- **String-based parameter identification**: Using `string Param` instead of an enum or typed identifier increases risk of typos/mismatches (e.g., `"Status"` vs `"status"`).
|
||||
- **No versioning or metadata**: The event carries no timestamp, correlation ID, or version info—making debugging or deduplication difficult in complex flows.
|
||||
- **Namespace quirk**: The `// ReSharper disable CheckNamespace` comment suggests namespace alignment may be manually enforced, but the `DTS.Common.Events` namespace is used despite the file path `.../DTS.Viewer/...`. Developers should verify namespace consistency across the codebase.
|
||||
- **No documentation on event lifecycle**: It is unclear whether this event is intended for one-time use, repeated updates, or if subscribers must clean up to avoid memory leaks (standard Prism practice applies: always `Unsubscribe` when appropriate).
|
||||
|
||||
*None identified from source alone.*
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerSettings/CalibrationBehaviorSettableInViewerChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerSettings/ViewerSettingsVisibilityChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:52.617936+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7819516e9af4aa9e"
|
||||
---
|
||||
|
||||
# ViewerSettings
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines two Prism-based event types used for broadcasting changes to viewer settings within the DTS application. Specifically, `CalibrationBehaviorSettableInViewerChangedEvent` signals when the availability (enabled/disabled state) of calibration behavior configuration in the viewer has changed, while `ViewerSettingsVisibilityChangedEvent` signals when the visibility state of the viewer settings panel has changed. These events facilitate loose coupling between components that manage or respond to viewer configuration state, enabling reactive UI updates or logic adjustments without direct dependencies.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
- **`CalibrationBehaviorSettableInViewerChangedEvent`**
|
||||
- **Inherits from**: `CompositePresentationEvent<bool>`
|
||||
- **Behavior**: A Prism event used to publish and subscribe to changes in whether calibration behavior settings are settable (i.e., enabled) in the viewer. The payload is a `bool`: `true` indicates calibration behavior *is* settable; `false` indicates it is not.
|
||||
- **Usage**: Published when the underlying logic determines that the user should or should not be allowed to modify calibration behavior via the viewer UI (e.g., due to permissions, mode constraints, or data state).
|
||||
|
||||
- **`ViewerSettingsVisibilityChangedEvent`**
|
||||
- **Inherits from**: `CompositePresentationEvent<Visibility>`
|
||||
- **Behavior**: A Prism event used to publish and subscribe to changes in the visibility of the viewer settings panel. The payload is a `System.Windows.Visibility` value (`Visible`, `Collapsed`, or `Hidden`).
|
||||
- **Usage**: Published when the viewer settings panel is shown, hidden, or collapsed—e.g., in response to user actions (toggling a settings button) or application state changes (e.g., entering full-screen mode).
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- Both events are *purely informational*—they carry no side effects beyond notification; subscribers are responsible for any state changes or UI updates.
|
||||
- The payload for `CalibrationBehaviorSettableInViewerChangedEvent` is strictly a `bool`, with no defined semantics beyond “settable” (`true`) vs. “not settable” (`false`). No intermediate or invalid states are implied.
|
||||
- The payload for `ViewerSettingsVisibilityChangedEvent` must be one of the three `Visibility` enum values defined in `System.Windows`, and no other values are expected.
|
||||
- Events are published *asynchronously* (via Prism’s `CompositePresentationEvent` semantics), so subscribers may not receive events in the same call stack as the publisher.
|
||||
- No ordering guarantees are provided between these two events—e.g., a visibility change may occur before or after a settable-state change, and subscribers must handle arbitrary sequences.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **External Dependencies**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation).
|
||||
- `System.Windows` (for `Visibility` type used in `ViewerSettingsVisibilityChangedEvent`).
|
||||
|
||||
- **Namespace**:
|
||||
- Defined in `DTS.Common.Events`, indicating it is part of a shared/common core library (`DTS.CommonCore`).
|
||||
|
||||
- **Inferred Usage**:
|
||||
- Likely consumed by viewer-related UI components (e.g., a settings panel view model or control) and possibly by core logic modules that manage calibration or viewer state.
|
||||
- No direct reverse dependencies are visible in the source—these are leaf event definitions.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No default value semantics**: The source does not specify what the *initial* value of `CalibrationBehaviorSettableInViewerChangedEvent` or `ViewerSettingsVisibilityChangedEvent` should be (e.g., whether `false` or `Visibility.Collapsed` is the default). Subscribers must not assume an initial state unless documented elsewhere.
|
||||
- **`Visibility` ambiguity**: `Visibility` has three states (`Visible`, `Collapsed`, `Hidden`), but the source does not clarify whether all three are intentionally used or whether only `Visible`/`Collapsed` are expected. Misuse (e.g., publishing `Hidden` when only `Collapsed` is handled) could cause subtle UI inconsistencies.
|
||||
- **No deprecation or versioning markers**: The events lack attributes or comments indicating planned obsolescence, migration paths, or versioning—though this may be handled at a higher architectural layer.
|
||||
- **Namespace consistency**: The `// ReSharper disable CheckNamespace` directive suggests the namespace is intentionally `DTS.Common.Events` (not nested under `DTS.CommonCore.Events`), which may conflict with folder structure expectations. Developers should verify expected namespace usage.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,136 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionChangeNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphChannelReadCalcProgressChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphChannelsReadCompletedNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/DataFileSelectedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphLoadedCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/TestLoadedCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/TestSummaryCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphClearNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelsNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationLineFitNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/TestSummaryChangeNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/DataFolderChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:13.872680+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "cf000c210789fe90"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer Test Summary Events Module
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of Prism-based event types used for decoupled communication within the DTS Viewer component, specifically for tracking and propagating changes related to test data selection, channel state, graph loading, and progress updates. It serves as a central event bus for UI and view model layers to react to state changes in the Test Summary view (e.g., when channels are selected, graphs are loaded, or data files/folders change), enabling modular and testable architecture without tight coupling between components.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
All event classes inherit from `CompositePresentationEvent<TPayload>` (Prism event type), and payloads are strongly typed. Public types are:
|
||||
|
||||
### Event Classes (Payload Types in parentheses):
|
||||
|
||||
- **`ChannelSelectionCountNotification`** (`int`)
|
||||
Published when the count of selected test channels changes.
|
||||
|
||||
- **`ChannelsModificationNotification`** (`List<ITestChannel>`)
|
||||
Published when the set of selected test channels is modified (e.g., added/removed). Payload is the *current* list of selected channels.
|
||||
|
||||
- **`ChannelSelectionChangeNotification`** (`List<ITestChannel>`)
|
||||
Published when the selected test channel list changes. Payload is the *new* list of selected channels.
|
||||
*Note: Semantically similar to `ChannelsModificationNotification`; distinction unclear from source.*
|
||||
|
||||
- **`GraphChannelReadCalcProgressChangedEvent`** (`GraphChannelReadCalcProgressChangedEventArgs`)
|
||||
Published to report progress during graph channel read/calculation. Payload contains:
|
||||
- `ProgressMessage`: string description of current operation.
|
||||
- `ProgressPercent`: double (0–100) indicating completion percentage.
|
||||
- `GraphVM`: `IBaseViewModel` instance associated with the graph.
|
||||
|
||||
- **`GraphChannelsReadCompletedNotification`** (`GraphChannelsReadCompletedNotificationArgs`)
|
||||
Published when reading channels for a graph completes. Payload contains:
|
||||
- `IsReadCompleted`: bool indicating success/failure status.
|
||||
- `GraphVM`: `IBaseViewModel` instance associated with the graph.
|
||||
|
||||
- **`DataFileSelectedEvent`** (`DataFileSelectionArg`)
|
||||
Published when a specific data file is selected (distinct from folder-level changes). Payload contains:
|
||||
- `File`: string path to the selected file.
|
||||
- `ParentVM`: `IBaseViewModel` referencing the owner view model (for multi-view reuse).
|
||||
|
||||
- **`GraphLoadedCountNotification`** (`GraphLoadedCountNotificationArg`)
|
||||
Published when the count of loaded graphs changes. Payload contains:
|
||||
- `LoadedCount`: int number of loaded graphs.
|
||||
- `ParentVM`: `IBaseViewModel` instance (for multi-view reuse).
|
||||
|
||||
- **`TestLoadedCountNotification`** (`TestLoadedCountNotificationArg`)
|
||||
Published when the count of loaded tests changes. Payload contains:
|
||||
- `LoadedCount`: int number of loaded tests.
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`TestSummaryCountNotification`** (`TestSummaryCountNotificationArg`)
|
||||
Published when the count of items in the test summary list changes. Payload contains:
|
||||
- `SummaryCount`: int number of summary items.
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`GraphClearNotification`** (`GraphClearNotificationArg`)
|
||||
Published when a graph is cleared. Payload contains:
|
||||
- `GraphClear`: bool (always `true` per usage; likely legacy naming).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`GraphSelectedChannelCountNotification`** (`GraphSelectedChannelCountNotificationArg`)
|
||||
Published when the count of selected channels *for a specific graph* changes. Payload contains:
|
||||
- `SelectedChannelCount`: int number of selected channels.
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`GraphSelectedChannelsNotification`** (`GraphSelectedChannelsNotificationArg`)
|
||||
Published when the set of selected channels *for a specific graph* changes. Payload contains:
|
||||
- `SelectedChannels`: `List<ITestChannel>` (current selection).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`ChannelsModificationLineFitNotification`** (`LineFitArgs`)
|
||||
Published to request or notify about line-fit calculations on a channel. Payload contains:
|
||||
- `Channel`: `ITestChannel` to process.
|
||||
- `StartIndex`: `ulong` start index for fit range.
|
||||
- `EndIndex`: `ulong` end index for fit range.
|
||||
|
||||
- **`TestSummaryChangeNotification`** (`TestSummaryChangeNotificationArg`)
|
||||
Published when the test summary list changes. Payload contains:
|
||||
- `SummaryList`: `List<ITestSummary>` (new summary items).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`DataFolderChangedEvent`** (`DataFolderSelectionArg`)
|
||||
Published when the data folder path changes. Payload contains:
|
||||
- `Path`: string folder path.
|
||||
- `File`: string file path (may be null or empty).
|
||||
- `SetSelected`: bool flag indicating whether to select the file in UI/viewer (default `false`).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- All events derive from `CompositePresentationEvent<T>`, implying they are published/subscribed via Prism’s `EventAggregator`.
|
||||
- Payloads are *always* passed by reference (no defensive copies implied by source).
|
||||
- `ParentVM` is consistently present in all events related to multi-view reuse (commented as part of issue #24417), and must be non-null when used in contexts requiring view model scoping.
|
||||
- `DataFileSelectedEvent` is explicitly intended *not* to trigger `DataFolderChangedEvent` subscribers (per inline comment), indicating a semantic distinction between file-level and folder-level selection.
|
||||
- `GraphClearNotificationArg.GraphClear` is always `true` in practice (despite being a `bool` property), suggesting legacy naming or incomplete refactoring.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation).
|
||||
- `DTS.Common.Base` (provides `IBaseViewModel`).
|
||||
- `DTS.Common.Interface` (provides `ITestChannel`, `ITestSummary`).
|
||||
- `DTS.Common.Interface.TestDefinition` (provides `ITestSummary` via `TestSummaryChangeNotification`).
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- Any component in the Viewer/Test Summary UI or view models that needs to react to selection, loading, or progress changes (e.g., `IBaseViewModel` implementations, UI controls).
|
||||
- Likely consumed by modules handling graph rendering, channel selection, and data file/folder navigation.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Ambiguous event semantics**: `ChannelsModificationNotification` and `ChannelSelectionChangeNotification` both carry `List<ITestChannel>` and have near-identical documentation ("selected Test Summary list changed" vs "selected Graphs changed"). Without runtime usage context, it is unclear if they serve distinct purposes or are redundant.
|
||||
- **`GraphClear` property naming**: `GraphClearNotificationArg.GraphClear` is always `true` (per usage pattern), suggesting it should be a constant or removed. Its presence may mislead consumers into expecting variable state.
|
||||
- **`DataFileSelectedEvent` vs `DataFolderChangedEvent`**: Though both involve file/folder paths, `DataFileSelectedEvent` is explicitly designed *not* to trigger `DataFolderChangedEvent` subscriptions. Consumers must avoid conflating the two.
|
||||
- **`LineFitArgs` immutability**: `LineFitArgs` has read-only properties (`Channel`, `StartIndex`, `EndIndex`) initialized via constructor, but `ChannelsModificationLineFitNotification` is a *notification* (not a request), implying consumers should not mutate the payload.
|
||||
- **`ParentVM` usage**: All events with `ParentVM` are tied to multi-view reuse (issue #24417). Omitting or misassigning `ParentVM` may cause incorrect view scoping in PSD report or other derived viewers.
|
||||
- **No validation rules**: Payloads (e.g., `List<ITestChannel>`, `IBaseViewModel`) are not validated in the event definitions. Consumers must handle nulls, empty lists, or invalid states.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Database/DbStatusEvent.cs
|
||||
generated_at: "2026-04-16T02:47:59.031594+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "e7feae6606912806"
|
||||
---
|
||||
|
||||
# Database
|
||||
|
||||
## 1. Purpose
|
||||
This module defines event infrastructure for communicating database operation status changes within the application, specifically to notify subscribers when database-related operations (such as connection, backup, copy, or restore) succeed or fail. It leverages the Prism event aggregation pattern (`CompositePresentationEvent`) to decouple event producers (e.g., database service logic) from consumers (e.g., UI components or logging modules), enabling asynchronous, loosely coupled status reporting.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`DbStatusEvent`**
|
||||
*Type:* `class` inheriting from `CompositePresentationEvent<DbStatusArg>`
|
||||
*Behavior:* A Prism event class used to publish and subscribe to database status updates. Subscribers receive a `DbStatusArg` payload describing the outcome of a database operation.
|
||||
|
||||
- **`DbStatusArg`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `EventTypes Status { get; }` — The type of database event that occurred (e.g., `Complete`, `FailedToConnectToRemote`).
|
||||
- `Exception Exception { get; }` — The exception associated with the event (may be `null` for non-error events like `Complete`).
|
||||
*Constructor:*
|
||||
- `DbStatusArg(EventTypes error, Exception exception)` — Initializes a new instance with the specified status and exception. Both parameters are stored immutably.
|
||||
|
||||
- **`DbStatusArg.EventTypes`**
|
||||
*Type:* `enum`
|
||||
*Values:*
|
||||
- `FailedToConnectToRemote`
|
||||
- `FailedToBackupLocal`
|
||||
- `FailedToCopy`
|
||||
- `FailedToRestoreLocal`
|
||||
- `FailedToBackupLocalFileNotFound`
|
||||
- `Complete`
|
||||
- `LegacyStatus`
|
||||
|
||||
## 3. Invariants
|
||||
- `Status` and `Exception` are **immutable** after construction (no setters beyond initialization).
|
||||
- `Exception` may be `null`, but only for non-error statuses (e.g., `Complete`). For error statuses, an exception *should* be provided, though the class does not enforce this at runtime.
|
||||
- The `EventTypes` enum values are exhaustive for known database operation outcomes; no validation ensures that only these values are used.
|
||||
- The event is published via Prism’s event aggregation system, implying thread-safety and subscription lifecycle management (e.g., unsubscription required to avoid memory leaks), though the source file itself does not enforce subscription rules.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `System` (for `Exception`)
|
||||
- `Microsoft.Practices.Prism.Events` (for `CompositePresentationEvent<T>`)
|
||||
- `DTS.Common.Events.Database` namespace (internal module scope)
|
||||
|
||||
- **Depended on by (inferred):**
|
||||
- Any module or component that needs to react to database status changes (e.g., UI layers subscribing to `DbStatusEvent` to update status indicators, or logging services publishing to an external system).
|
||||
- *Note:* The source file does not specify concrete consumers; dependencies are implied by the event’s purpose and Prism usage.
|
||||
|
||||
## 5. Gotchas
|
||||
- `LegacyStatus` is included in `EventTypes` but its meaning is undocumented; its purpose is unclear from the source alone.
|
||||
- The `Exception` property is nullable, but the constructor does not validate that non-`Complete` statuses include a non-null exception. Consumers must defensively handle `null` exceptions for error statuses.
|
||||
- The class uses Prism’s `CompositePresentationEvent<T>`, which implies **thread marshaling may be required** for UI updates (e.g., via `Subscribe` with `ThreadOption.UIThread`). This is not enforced by the event class itself.
|
||||
- No versioning or deprecation mechanism is evident for `EventTypes`; adding/removing values may break consumers.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Diagnostics/CheckDataToDownloadEvent.cs
|
||||
generated_at: "2026-04-16T02:48:40.389549+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3e255fee03a6af6b"
|
||||
---
|
||||
|
||||
# Diagnostics
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a Prism-based event (`CheckDataToDownloadEvent`) used to signal and coordinate a check for data that needs to be downloaded in the DTS system. It enables decoupled communication between components: a producer (e.g., a service or UI module) raises the event to request validation or assessment of download requirements, optionally bypassing the check (e.g., for forced updates or initialization scenarios). The event carries context via `CheckDataToDownloadEventArgs`, including whether the check should be skipped and a reference to the originating component.
|
||||
|
||||
### 2. Public Interface
|
||||
- **`CheckDataToDownloadEvent`**
|
||||
*Type:* `class` inheriting from `CompositePresentationEvent<CheckDataToDownloadEventArgs>`
|
||||
*Behavior:* A Prism event used for publishing and subscribing to download-check requests across modules. As a `CompositePresentationEvent`, it supports thread marshaling (via `ThreadOption`) and event subscription management (e.g., weak references, multiple subscribers).
|
||||
|
||||
- **`CheckDataToDownloadEventArgs`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `bool BypassCheck { get; }` — Indicates whether the download check logic should be skipped. `true` means the check is bypassed (e.g., proceed directly to download or skip validation).
|
||||
- `object Producer { get; }` — A reference to the component that raised the event (e.g., a view model, service, or controller). Used for tracing or context-aware handling.
|
||||
*Constructor:*
|
||||
- `CheckDataToDownloadEventArgs(bool bypassCheck, object o)` — Initializes the args with the bypass flag and producer reference. Both parameters are required and immutable after construction.
|
||||
|
||||
### 3. Invariants
|
||||
- `BypassCheck` is set at construction and **never modified** (read-only via `private set`).
|
||||
- `Producer` is set at construction and **never modified** (read-only via `private set`).
|
||||
- `Producer` may be `null` (no validation is enforced in the constructor), but callers are expected to provide a meaningful reference when possible.
|
||||
- The event is intended for **one-time publication per request**; repeated publications require new event instances.
|
||||
- No ordering guarantees exist for subscribers (Prism’s `CompositePresentationEvent` delivers events to all subscribers concurrently or in undefined order depending on configuration).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation).
|
||||
- `DTS.Common.Events.Diagnostics` namespace (module-scoped grouping; no external cross-module dependencies implied by the file alone).
|
||||
- **Used by:**
|
||||
- Any module/component needing to trigger or respond to download-check requests (e.g., a data synchronization service, update manager, or UI component).
|
||||
- Subscribers would typically be in modules that handle data download logic (e.g., `DTS.DownloadService`), though not explicitly stated in this file.
|
||||
|
||||
### 5. Gotchas
|
||||
- `Producer` is typed as `object`, not a specific interface or base type (e.g., `IProducer`), which may lead to runtime type-casting assumptions in subscribers.
|
||||
- No validation on `bypassCheck` values (e.g., `true`/`false` are both accepted without constraint).
|
||||
- The event name `CheckDataToDownloadEvent` implies a *request* for a check, but subscribers may misinterpret it as a *notification* of completed checks—clear documentation of intent is critical.
|
||||
- `CompositePresentationEvent` implies thread-safety via event aggregation, but subscribers must still handle cross-thread access if `Producer` is UI-bound (e.g., marshaling to the UI thread).
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/GroupTemplates/CustomChannels/CustomChannelExportFileSetEvent.cs
|
||||
- Common/DTS.CommonCore/Events/GroupTemplates/CustomChannels/CustomChannelImportEvent.cs
|
||||
generated_at: "2026-04-16T02:49:05.802703+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "46fed4b1ba64a18a"
|
||||
---
|
||||
|
||||
# CustomChannels
|
||||
|
||||
## Documentation: Custom Channel Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based events used to coordinate custom channel import and export operations within the application’s Group Templates feature. Specifically, it provides a mechanism to signal when a custom channel export file set is ready (triggering UI busy state) and to report the completion status of a custom channel import operation. These events facilitate decoupled communication between components involved in custom channel lifecycle management.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`CustomChannelExportFileSetEvent`**
|
||||
- *Type*: `class`
|
||||
- *Inherits*: `CompositePresentationEvent<string>`
|
||||
- *Behavior*: A Prism event used to notify subscribers that a custom channel export file set has been generated. The payload is a `string`, which (based on naming and typical usage) is expected to represent the file path or identifier of the exported file set. Subscribers should interpret this string as the location or reference to the exported data.
|
||||
|
||||
- **`CustomChannelImportEvent`**
|
||||
- *Type*: `class`
|
||||
- *Inherits*: `CompositePresentationEvent<CustomChannelImportEventArgs>`
|
||||
- *Behavior*: A Prism event used to signal the completion status of a custom channel import operation.
|
||||
|
||||
- **`CustomChannelImportEventArgs`**
|
||||
- *Type*: `class`
|
||||
- *Properties*:
|
||||
- `ImportStatus`: `Status` — read-only; indicates the outcome of the import operation.
|
||||
- *Constructors*:
|
||||
- `CustomChannelImportEventArgs(Status status)` — initializes the event args with the given import status.
|
||||
- *Nested Type*:
|
||||
- `Status` — `enum` with a single member:
|
||||
- `Done` — indicates the import operation has completed.
|
||||
|
||||
### 3. Invariants
|
||||
- `CustomChannelExportFileSetEvent` payloads are non-null `string` values representing an exported file set reference (e.g., a file path). Null payloads are not explicitly guarded against in the event definition, but their presence would likely cause downstream failures.
|
||||
- `CustomChannelImportEventArgs` instances must be constructed with a valid `Status` value; currently, only `Status.Done` is defined, implying that *only successful import completions are reported*. No error or cancellation states are modeled in the current implementation.
|
||||
- Events are published via Prism’s `EventAggregator`, so subscribers must be registered and unregistered appropriately to avoid memory leaks or missed notifications.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation)
|
||||
- `DTS.CommonCore` (namespace context for shared core types)
|
||||
- **Used by**:
|
||||
- Components responsible for custom channel export (publishing `CustomChannelExportFileSetEvent`)
|
||||
- Components responsible for custom channel import (publishing `CustomChannelImportEvent`)
|
||||
- UI or service layers that react to these events (e.g., to toggle busy states or update import history)
|
||||
|
||||
### 5. Gotchas
|
||||
- The `CustomChannelExportFileSetEvent` inherits `CompositePresentationEvent<string>`, but the documentation comment does not clarify the *meaning* of the `string` payload (e.g., is it a file path, a GUID, or serialized metadata?). This ambiguity may lead to inconsistent interpretation by subscribers.
|
||||
- `CustomChannelImportEventArgs.Status` currently only supports `Done`. If import failures or partial successes occur, they are *not* reported via this event, potentially masking errors or leaving subscribers unaware of non-success outcomes.
|
||||
- The `CustomChannelImportEvent` and `CustomChannelExportFileSetEvent` share the same namespace (`DTS.Common.Events.GroupTemplates.CustomChannels`), suggesting they are part of a related workflow, but no explicit ordering or dependency between them is enforced (e.g., export must precede import).
|
||||
- No validation is performed on the `string` payload of `CustomChannelExportFileSetEvent`; subscribers must assume responsibility for path existence, format, or permissions.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupDoubleClickEvent.cs
|
||||
- Common/DTS.CommonCore/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupTemplateSelectedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:23.076829+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "20dafea03a43d30f"
|
||||
---
|
||||
|
||||
# GroupTemplateList
|
||||
|
||||
## 1. Purpose
|
||||
This module defines two Prism-based events used for inter-module communication in the DTS application related to group template management in the UI. Specifically, `GroupTemplateListGroupDoubleClickEvent` signals when a user double-clicks on a group template (carrying the template’s identifier as a `string`), while `GroupTemplateListGroupTemplateSelectedEvent` signals when one or more group templates are selected (carrying an array of template identifiers as `string[]`). These events decouple UI components (e.g., a list view and a detail panel or command handler) by enabling event-driven responses to user interactions.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`GroupTemplateListGroupDoubleClickEvent`**
|
||||
- *Signature*: `public class GroupTemplateListGroupDoubleClickEvent : CompositePresentationEvent<string>`
|
||||
- *Behavior*: A Prism `CompositePresentationEvent` that publishes a single `string` payload—the identifier of the group template that was double-clicked. Intended for use when a double-click action should trigger an immediate operation (e.g., opening the template for editing or preview).
|
||||
|
||||
- **`GroupTemplateListGroupTemplateSelectedEvent`**
|
||||
- *Signature*: `public class GroupTemplateListGroupTemplateSelectedEvent : CompositePresentationEvent<string[]>`
|
||||
- *Behavior*: A Prism `CompositePresentationEvent` that publishes a `string[]` payload—identifiers of the group templates currently selected in the UI (e.g., via checkbox or multi-select). Intended for scenarios where selection state changes (e.g., enabling/disabling toolbar buttons or updating a summary view).
|
||||
|
||||
## 3. Invariants
|
||||
- The payload for `GroupTemplateListGroupDoubleClickEvent` is always a non-null `string` representing exactly one template ID (since double-click implies a single item).
|
||||
- The payload for `GroupTemplateListGroupTemplateSelectedEvent` is always a non-null `string[]`, though the array may be empty (indicating no selection).
|
||||
- Event payloads contain *only* template identifiers (no metadata or full objects); consumers must resolve IDs to template instances via other means (e.g., a service or cache).
|
||||
- No ordering guarantee is specified for the `string[]` in `GroupTemplateListGroupTemplateSelectedEvent`; consumers must not assume the order reflects UI selection order unless documented elsewhere.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies *of* this module**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library, specifically `CompositePresentationEvent<T>`).
|
||||
- Implicitly depends on `DTS.Common.Events.GroupTemplates.GroupTemplateList` namespace structure (other event types may exist in this hierarchy, but none are referenced here).
|
||||
- **Dependencies *on* this module**:
|
||||
- UI components (e.g., a `GroupTemplateList` view) that publish these events.
|
||||
- Command handlers or view models (e.g., `GroupTemplateListViewModel`) that subscribe to these events to react to user actions.
|
||||
- No direct dependencies on other *events* in the source—though logically, these events likely coordinate with other group-template-related events (e.g., load/save events), but those are not evident from the provided files.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Naming inconsistency**: The class `GroupTemplateListGroupDoubleClickEvent` is documented as `The GroupTemplateListGroupTemplateSelectedEvent event` in its XML comment—this appears to be a copy-paste error in the comment (the class name itself is correct).
|
||||
- **Ambiguous semantics**: The distinction between *selection* and *double-click* is not clarified in the source. Double-click may or may not trigger a selection event first; consumers should not assume ordering or mutual exclusivity without external documentation.
|
||||
- **No validation on IDs**: Neither event validates or enforces ID format (e.g., GUID vs. numeric). Consumers must handle invalid or missing IDs gracefully.
|
||||
- **Array mutability risk**: Since `string[]` is passed directly, subscribers could inadvertently modify the array. Prism does not clone payloads; consider defensive copying if mutation is a concern (not enforced here).
|
||||
- **No cancellation support**: These are `CompositePresentationEvent<T>` (not `PubSubEvent<T>`), meaning all subscribers are invoked synchronously and cannot cancel the event. This may cause side effects if one subscriber fails.
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/GroupTemplates/TemplateChannelList/TemplateChannelListOrderChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/GroupTemplates/TemplateChannelList/TemplateChannelListSelectionChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/GroupTemplates/TemplateChannelList/TemplateChannelListRequiredChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:20.561270+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2352802106c3fc56"
|
||||
---
|
||||
|
||||
# TemplateChannelList
|
||||
|
||||
## Documentation: TemplateChannelList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used to communicate changes in the state of a *template channel list*—a UI or logical construct representing ordered, selectable channels associated with a group template. Specifically, it publishes events when the *order* of channels changes, when the *selection* among channels changes, or when the *required status* of the channel list changes (e.g., whether at least one channel must be selected). These events decouple UI components or services that manage or react to channel list state, enabling modular and testable event-driven behavior within the application.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`TemplateChannelListOrderChangedEvent`**
|
||||
- **Type**: `class` inheriting from `CompositePresentationEvent<IGroupTemplateChannel>`
|
||||
- **Behavior**: Published when the *order* of channels in the template channel list has been modified (e.g., via drag-and-drop reordering). The payload is the `IGroupTemplateChannel` instance that was moved (or the channel whose position changed most significantly—implementation detail not specified in source).
|
||||
|
||||
- **`TemplateChannelListSelectionChangedEvent`**
|
||||
- **Type**: `class` inheriting from `CompositePresentationEvent<IGroupTemplateChannel>`
|
||||
- **Behavior**: Published when the *selection state* of a channel in the list changes (e.g., a channel is selected or deselected). The payload is the `IGroupTemplateChannel` instance whose selection status changed.
|
||||
|
||||
- **`TemplateChannelListRequiredChangedEvent`**
|
||||
- **Type**: `class` inheriting from `CompositePresentationEvent<TemplateChannelListRequiredChangeEventArgs>`
|
||||
- **Behavior**: Published when the *required status* of the channel list changes (e.g., the list transitions from optional to mandatory, or vice versa). The payload is a `TemplateChannelListRequiredChangeEventArgs` object containing:
|
||||
- `Consumer`: The object (e.g., UI control, service) triggering or affected by the change.
|
||||
- `Channels`: An array of `IGroupTemplateChannel` instances currently in the list.
|
||||
|
||||
- **`TemplateChannelListRequiredChangeEventArgs`**
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `public object Consumer { get; }` — The entity responsible for the change.
|
||||
- `public IGroupTemplateChannel[] Channels { get; }` — The current set of channels in the list at the time of the event.
|
||||
- **Constructor**: `TemplateChannelListRequiredChangeEventArgs(object o, IGroupTemplateChannel[] channels)` — Initializes the args with the consumer and channel array.
|
||||
|
||||
### 3. Invariants
|
||||
- All events derive from `CompositePresentationEvent<T>`, meaning they are published/subscribed via Prism’s event aggregation mechanism and are *thread-safe* for cross-thread publishing (subject to Prism’s default behavior).
|
||||
- The payload for `TemplateChannelListOrderChangedEvent` and `TemplateChannelListSelectionChangedEvent` is a *single* `IGroupTemplateChannel` instance, implying events are likely published per-channel changes (not batched).
|
||||
- For `TemplateChannelListRequiredChangedEvent`, the `Channels` array is non-null (as it is assigned directly from constructor parameter), but its *contents* may be empty if no channels exist.
|
||||
- The `Consumer` property in `TemplateChannelListRequiredChangeEventArgs` is typed as `object`, indicating no specific contract is enforced—consumers must cast or inspect as needed.
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Interface.GroupTemplate` (specifically `IGroupTemplateChannel` interface)
|
||||
- `Microsoft.Practices.Prism.Events` (`CompositePresentationEvent<T>`)
|
||||
|
||||
- **Depended on by**:
|
||||
- Any module or component that manages or reacts to template channel list state (e.g., UI views, view models, or services handling group templates).
|
||||
- *Inferred*: Components that implement or consume `IGroupTemplateChannel` (e.g., channel list controls, template editors) will likely subscribe to these events.
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Misleading XML documentation**: All three event classes share the same summary comment: *“The GroupTemplateListGroupTemplateSelectedEvent event.”* and remarks: *“called when a template is selected.”* This is **inaccurate** for `TemplateChannelListOrderChangedEvent` and `TemplateChannelListRequiredChangedEvent`, and partially misleading for `TemplateChannelListSelectionChangedEvent` (which concerns *channel* selection, not *template* selection). This may cause confusion during maintenance.
|
||||
- **Ambiguous semantics**: The source does not clarify whether `TemplateChannelListOrderChangedEvent` publishes the *moved* channel, the *source* channel, or the *entire list*—only that it carries a single `IGroupTemplateChannel`. Similarly, it is unclear whether `TemplateChannelListSelectionChangedEvent` fires on *any* selection change or only on *user-initiated* selection changes.
|
||||
- **No batch support**: Events are single-channel focused; reordering or bulk selection changes may require multiple event publications, potentially impacting performance or consistency if not handled atomically by subscribers.
|
||||
- **`Consumer` type safety**: `TemplateChannelListRequiredChangeEventArgs.Consumer` is `object`, requiring runtime type checks or casting—no compile-time safety.
|
||||
- **No event filtering or cancellation**: As Prism `CompositePresentationEvent<T>` instances, these events do not support payload filtering or cancellation by default (unlike `PubSubEvent<T>` with `ThreadOption.PublisherThread` or custom `SubscriptionToken` handling).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupChannelList/GroupChannelDeleteRequestEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupChannelList/GroupChannelsChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupChannelList/GroupUpdatedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:37.172100+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1f00e06c87e755ec"
|
||||
---
|
||||
|
||||
# GroupChannelList
|
||||
|
||||
## Documentation: GroupChannelList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used for communication related to group channel list management within the DTS system. It enables decoupled notification of changes to group channel structures—such as channel deletions, overall channel count updates, and logical group updates (e.g., channel insertion or assignment changes)—across UI layers and business logic components. These events follow the Prism `CompositePresentationEvent<T>` pattern, supporting subscription on multiple threads and view-model-level decoupling.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `GroupChannelDeleteRequestEvent`
|
||||
- **Type**: `class` (inherits `CompositePresentationEvent<GroupChannelDeleteRequestEventArgs>`)
|
||||
- **Behavior**: Publishes a request to delete a specific channel from a group. Subscribers are expected to handle the deletion logic.
|
||||
|
||||
#### `GroupChannelDeleteRequestEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `object Page` — The UI page or context where the deletion was initiated.
|
||||
- `IGroupChannel Channel` — The channel object requested for deletion.
|
||||
- **Constructor**: `GroupChannelDeleteRequestEventArgs(object page, IGroupChannel channel)`
|
||||
|
||||
#### `GroupChannelsChangedEvent`
|
||||
- **Type**: `class` (inherits `CompositePresentationEvent<GroupChannelsChangedEventArgs>`)
|
||||
- **Behavior**: Published when the number of channels in a group has changed (e.g., after bulk add/remove operations).
|
||||
- **Note**: The XML comment incorrectly labels this as “The GroupUpdated event” and states it is “called when a template is selected,” which appears inconsistent with its name and payload. Actual semantics are inferred from the type name and data.
|
||||
|
||||
#### `GroupChannelsChangedEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `object Group` — The group whose channel count has changed.
|
||||
- `int ChannelCount` — The new total number of channels in the group.
|
||||
- **Constructor**: `GroupChannelsChangedEventArgs(object group, int channelCount)`
|
||||
|
||||
#### `GroupUpdatedEvent`
|
||||
- **Type**: `class` (inherits `CompositePresentationEvent<GroupUpdatedEventArgs>`)
|
||||
- **Behavior**: Published when a logical update occurs within a group’s channel list, such as insertion of new channels or assignment of channels to users/groups.
|
||||
|
||||
#### `GroupUpdatedEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `object Page` — The UI page or context where the update occurred.
|
||||
- `Status UpdateStatus` — Indicates the type of update performed (see enum below).
|
||||
- **Enum `Status`**:
|
||||
- `ChannelsInserted` — New channels were inserted into the group.
|
||||
- `AssignmentsMade` — Channel assignments (e.g., user/group permissions) were modified.
|
||||
- **Constructor**: `GroupUpdatedEventArgs(object page, Status status)`
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- All event args classes are **immutable** after construction (no setters beyond the constructor).
|
||||
- `Channel` in `GroupChannelDeleteRequestEventArgs` is guaranteed non-null at construction time (enforced by constructor), but nullability of `Page` and `Group` is not explicitly constrained—callers may pass `null`.
|
||||
- `ChannelCount` in `GroupChannelsChangedEventArgs` must reflect the **current total** number of channels in the group after the change.
|
||||
- `UpdateStatus` in `GroupUpdatedEventArgs` must be one of the two defined enum values (`ChannelsInserted` or `AssignmentsMade`).
|
||||
- Events are published using Prism’s `CompositePresentationEvent<T>`, implying they support **thread-safe subscription** and **background thread publishing**, though the source does not specify default threading behavior (e.g., `ThreadOption`).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` — Provides `CompositePresentationEvent<T>`.
|
||||
- `DTS.Common.Interface.Channels.IGroupChannel` — Interface defining the contract for group channels (imported from `DTS.Common.Interface.Channels`).
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module handling group channel UI or state (e.g., view models, services) likely subscribes to these events.
|
||||
- The presence of `IGroupChannel` implies this module is part of a larger channel abstraction layer; consumers must implement or reference `DTS.Common.Interface.Channels`.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Misleading XML comments**:
|
||||
- `GroupChannelsChangedEvent` is documented as “The GroupUpdated event” and described as “called when a template is selected,” which contradicts its name and payload. This may cause confusion during maintenance.
|
||||
- `GroupUpdatedEvent` is documented identically, despite having a distinct purpose and payload.
|
||||
- **Ambiguous `Page`/`Group` semantics**:
|
||||
- The `object` type for `Page` and `Group` provides flexibility but lacks compile-time safety. Consumers must agree on expected types (e.g., `Page` likely represents a `FrameworkElement` or view model, but this is not specified).
|
||||
- **No explicit validation**:
|
||||
- No validation is enforced on `ChannelCount` (e.g., non-negative), though negative values would be semantically invalid.
|
||||
- **No event payload versioning**:
|
||||
- Adding new fields to event args (e.g., `ChannelCount` → `ChannelCount`, `ChannelIds`) would break backward compatibility for existing subscribers.
|
||||
- **None identified from source alone** for behavioral quirks beyond the above.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupsList/GroupListEditGroupEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupsList/GroupListGroupSelectedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:31.134710+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d421bd098cb2332c"
|
||||
---
|
||||
|
||||
# GroupsList
|
||||
|
||||
## Documentation Page: Group List Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines two Prism-based events used for inter-module communication in the DTS application related to group list UI interactions. Specifically, `GroupListEditGroupEvent` signals when a user selects a single group for editing, and `GroupListGroupSelectedEvent` signals when one or more groups are selected (e.g., for batch operations). These events decouple UI components (e.g., group list views) from handlers (e.g., view models or controllers) by leveraging the Prism event aggregation pattern.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `GroupListEditGroupEvent`
|
||||
- **Namespace**: `DTS.Common.Events.Groups.GroupList`
|
||||
- **Inherits**: `CompositePresentationEvent<int>`
|
||||
- **Behavior**: Published when a *single* group is selected for editing. The payload is the `int` ID of the selected group.
|
||||
|
||||
#### `GroupListGroupSelectedEvent`
|
||||
- **Namespace**: `DTS.Common.Events.Groups.GroupList`
|
||||
- **Inherits**: `CompositePresentationEvent<int[]>`
|
||||
- **Behavior**: Published when *one or more* groups are selected (e.g., via multi-select). The payload is an `int[]` array of group IDs in the current selection.
|
||||
|
||||
> **Note**: Despite the XML documentation comments referencing `"GroupTemplateListGroupTemplateSelectedEvent"` and `"called when a template is selected"`, the actual class names and payload types (`int` vs `int[]`) and the namespace context (`GroupList`) strongly indicate these events pertain to *groups*, not templates. This appears to be a copy-paste error in the comments.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `GroupListEditGroupEvent` **always** carries exactly one group ID (`int`), implying the event is intended for single-selection contexts.
|
||||
- `GroupListGroupSelectedEvent` **always** carries an array of group IDs (`int[]`), which may be empty, contain one element, or multiple elements.
|
||||
- Both events derive from `CompositePresentationEvent<T>`, meaning they are thread-safe for publishing/subscribing across UI threads (Prism’s default behavior for `CompositePresentationEvent`).
|
||||
- No validation rules or constraints are enforced on the group IDs (e.g., negative IDs or non-existent IDs are not prevented by the event definition itself).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *on***:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library, specifically `CompositePresentationEvent<T>`).
|
||||
- **Dependencies *of***:
|
||||
- UI components (e.g., group list controls) that publish these events when selection changes.
|
||||
- Subscribers (e.g., view models, services) that react to group selection changes (e.g., to load group details, enable edit commands, or trigger batch operations).
|
||||
- **No other internal module dependencies** are visible in the provided source files.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading XML comments**: Both event classes include documentation referencing `"GroupTemplateListGroupTemplateSelectedEvent"` and "template selection", which contradicts the class names, namespaces, and payload semantics (group IDs, not template IDs). This is likely stale documentation and could mislead developers.
|
||||
- **Ambiguity in selection semantics**: `GroupListGroupSelectedEvent` uses `int[]`, but the array’s ordering (e.g., sorted, user-selection order) and whether duplicates are possible are not specified. Subscribers must not assume ordering or uniqueness without external guarantees.
|
||||
- **No null safety**: Since `int` and `int[]` are value types (with `int[]` being a reference type but non-nullable in C# without `?`), the event payload is never `null`, but an empty array (`new int[0]`) is valid for `GroupListGroupSelectedEvent`. Subscribers must handle the empty-array case explicitly if needed.
|
||||
- **No versioning or deprecation markers**: The events lack attributes or comments indicating planned changes or obsolescence, but given the namespace (`DTS.CommonCore`), they are likely part of a stable shared layer—caution is warranted when modifying them.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,85 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListShowCompactEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListEditHardwareEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListHardwareSelectedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareReplaceEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareSavedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListHardwareIncludedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListHardwareTestPTPDomainIDEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListHardwareTestSampleRateEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListHardwareTestClockMasterEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Hardware/HardwareList/HardwareListHardwareTestAAFilterRateEvent.cs
|
||||
generated_at: "2026-04-16T02:49:11.648039+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "eb1cd97d7f791c3c"
|
||||
---
|
||||
|
||||
# Hardware List Events Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of Prism-based events used to communicate changes in hardware state and configuration within the hardware list UI and related components. It serves as the central event contract for operations such as toggling compact/expanded view, selecting hardware items, editing hardware, replacing hardware, saving hardware, including/excluding hardware, and modifying hardware test parameters (e.g., sample rate, PTP domain ID, clock master status, anti-aliasing filter rate). These events enable loose coupling between UI components (e.g., list view, detail panel) and backend logic handling hardware management in the DAS (Data Acquisition System) diagnostics context.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
All events inherit from `CompositePresentationEvent<TPayload>` (Prism), meaning they support multiple subscribers and are published on the event aggregator.
|
||||
|
||||
| Event Type | Payload Type | Description |
|
||||
|------------|--------------|-------------|
|
||||
| `HardwareListShowCompactEvent` | `bool` | Indicates whether the hardware list view should be shown in compact (`true`) or expanded (`false`) mode. |
|
||||
| `HardwareListEditHardwareEvent` | `string` | Indicates a request to edit hardware; payload is the serial number of the hardware to edit. |
|
||||
| `HardwareListHardwareSelectedEvent` | `string[]` | Indicates hardware selection; payload is an array of serial numbers of selected hardware items. |
|
||||
| `HardwareReplaceEvent` | `Tuple<IHardware, IHardware>` | Indicates a hardware replacement request; payload is a tuple of *(old hardware, new hardware)*. |
|
||||
| `HardwareSavedEvent` | `Tuple<int, string>` | Indicates hardware was added or updated; payload is *(database ID, serial number)*. |
|
||||
| `HardwareListHardwareIncludedEvent` | `HardwareListHardwareIncludedEventArgs` | Indicates inclusion/exclusion status of a hardware item changed; payload contains `SerialNumber`, `DASId`, and `Included` (boolean). |
|
||||
| `HardwareListHardwareTestPTPDomainIDEvent` | `HardwareListHardwareTestPTPDomainIDEventArgs` | Indicates the PTP domain ID for a hardware item in the current test was changed; payload contains `SerialNumber`, `DASId`, and `PTPDomainId` (byte). |
|
||||
| `HardwareListHardwareTestSampleRateEvent` | `HardwareListHardwareTestSampleRateEventArgs` | Indicates the sample rate for a hardware item in the current test was changed; payload contains `SerialNumber`, `DASId`, and `TestSampleRate` (double). |
|
||||
| `HardwareListHardwareTestClockMasterEvent` | `HardwareListHardwareTestClockMasterEventArgs` | Indicates the clock master status for a hardware item in the current test was changed; payload contains `SerialNumber`, `DASId`, and `IsClockMaster` (bool). |
|
||||
| `HardwareListHardwareTestAAFilterRateEvent` | `HardwareListHardwareTestAAFilterRateEventArgs` | Indicates the anti-aliasing filter rate for a hardware item in the current test was changed; payload contains `SerialNumber`, `DASId`, and `TestAAFilterRate` (float). |
|
||||
|
||||
### Event Argument Types (non-event classes)
|
||||
|
||||
| Type | Fields | Description |
|
||||
|------|--------|-------------|
|
||||
| `HardwareListHardwareIncludedEventArgs` | `string SerialNumber`, `int DASId`, `bool Included` | Encapsulates state change for hardware inclusion/exclusion. |
|
||||
| `HardwareListHardwareTestPTPDomainIDEventArgs` | `string SerialNumber`, `int DASId`, `byte PTPDomainId` | Encapsulates PTP domain ID change for a hardware item in a test. |
|
||||
| `HardwareListHardwareTestSampleRateEventArgs` | `string SerialNumber`, `int DASId`, `double TestSampleRate` | Encapsulates sample rate change for a hardware item in a test. |
|
||||
| `HardwareListHardwareTestClockMasterEventArgs` | `string SerialNumber`, `int DASId`, `bool IsClockMaster` | Encapsulates clock master status change for a hardware item in a test. |
|
||||
| `HardwareListHardwareTestAAFilterRateEventArgs` | `string SerialNumber`, `int DASId`, `float TestAAFilterRate` | Encapsulates anti-aliasing filter rate change for a hardware item in a test. |
|
||||
|
||||
> **Note**: All event argument classes have *read-only* properties (set only via constructor). All constructors require arguments in the order shown in the field list.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- All events are published on the Prism event aggregator and follow Prism’s `CompositePresentationEvent` semantics (thread-safe, multi-subscriber, async-safe).
|
||||
- Payloads are *never null* unless explicitly allowed by the type (e.g., `string[]` may be empty array, but `string` payload in `HardwareListEditHardwareEvent` is expected to be non-null and non-empty).
|
||||
- For events carrying `DASId`, the value is expected to be a valid identifier for a DAS unit in the system.
|
||||
- For events carrying `SerialNumber`, the value is expected to uniquely identify a hardware unit.
|
||||
- For test parameter events (`PTPDomainID`, `SampleRate`, `ClockMaster`, `AAFilterRate`), the change reflects the *current test configuration*, not necessarily the hardware’s persistent configuration.
|
||||
- `HardwareSavedEvent` payload: `int` is the database ID (assumed ≥ 0), `string` is the serial number (assumed non-null, non-empty).
|
||||
- `HardwareReplaceEvent` payload: `Tuple<IHardware, IHardware>` — first item is the hardware being replaced, second is the replacement. Both items are expected to be non-null and implement `IHardware` (from `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList`).
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` — for `CompositePresentationEvent<T>`.
|
||||
- `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` — referenced in `HardwareListEditHardwareEvent`, `HardwareListHardwareSelectedEvent`, `HardwareReplaceEvent` (via `IHardware` interface).
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- UI components (e.g., `HardwareListViewModel`, `HardwareListView`) likely subscribe to these events to update UI state.
|
||||
- Backend services handling hardware CRUD, replacement, and test configuration likely publish these events.
|
||||
- Other modules in the diagnostics or hardware management subsystems may subscribe to events like `HardwareSavedEvent`, `HardwareReplaceEvent`, or test parameter change events to synchronize state.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Naming inconsistency**: `HardwareListHardwareSelectedEvent` is documented as “hardware was selected”, but `HardwareListHardwareIncludedEvent` has a *different* purpose (inclusion/exclusion toggle). The class name `HardwareListHardwareIncludedEvent` is correct, but its XML comment incorrectly says “hardware was selected” — same as `HardwareListHardwareSelectedEvent`. This may cause confusion.
|
||||
- **Redundant naming**: `HardwareListHardwareSelectedEvent` and `HardwareListHardwareIncludedEvent` both have XML comments stating “hardware was selected”, despite having different payloads and semantics.
|
||||
- **Payload ambiguity**: `HardwareSavedEvent` is documented as “hardware was added or updated”, but the name suggests only addition. Developers may assume it’s *only* for additions.
|
||||
- **Event naming vs. purpose**: `HardwareListEditHardwareEvent` uses `string` payload (serial number), but its XML comment says “hardware was selected”, which conflicts with `HardwareListHardwareSelectedEvent`. This suggests possible copy-paste error in documentation.
|
||||
- **Missing null checks**: No validation is enforced at the event level — subscribers must handle null/empty serial numbers, invalid `DASId`, or out-of-range test parameters.
|
||||
- **`IHardware` interface**: Not defined in this module — defined in `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList`. Its contract (properties/methods) is not visible here; assume it contains hardware metadata (e.g., serial, model, status).
|
||||
- **No ordering guarantees**: Events are published asynchronously (Prism default). Subscribers must not assume ordering between events (e.g., `HardwareSavedEvent` may arrive before or after `HardwareListHardwareIncludedEvent` for the same hardware).
|
||||
- **`bool` in `HardwareListShowCompactEvent`**: `true` = compact, `false` = expanded. This is counter-intuitive (many would expect `true` = expanded), so care must be taken in UI binding.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/ISO/ExtraPropertiesChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:48:09.465052+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "e516fa28d2ce4f6a"
|
||||
---
|
||||
|
||||
# ISO
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines event infrastructure for propagating changes to a collection of extra properties within the ISO domain layer. Specifically, it provides a Prism-based event (`ExtraPropertiesChangedEvent`) and its argument container (`ExtraPropertiesChangedEventArgs`) to decouple producers of property updates (e.g., data sources, UI components, or business logic modules) from consumers (e.g., view models or services) in a loosely coupled, publish-subscribe pattern. It enables reactive updates to extended metadata associated with ISO-compliant entities, beyond standard properties.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `ExtraPropertiesChangedEvent`
|
||||
- **Signature**: `public class ExtraPropertiesChangedEvent : CompositePresentationEvent<ExtraPropertiesChangedEventArgs>`
|
||||
- **Behavior**: A Prism `CompositePresentationEvent` typed to `ExtraPropertiesChangedEventArgs`. Used to publish and subscribe to notifications when the set of extra properties has changed. Subscribers receive the updated list of properties, along with context about the producer and consumer involved.
|
||||
|
||||
#### `ExtraPropertiesChangedEventArgs`
|
||||
- **Signature**: `public class ExtraPropertiesChangedEventArgs`
|
||||
- **Properties**:
|
||||
- `IList<IExtraProperty> ExtraProperties { get; }`
|
||||
The new or updated list of extra properties. *Not null* (per constructor requirement), though the list itself may be empty.
|
||||
- `object Producer { get; }`
|
||||
The object instance that initiated or caused the change (e.g., a data adapter, service, or UI element).
|
||||
- `object Consumer { get; }`
|
||||
The object instance that is the target or recipient of the change (e.g., a view model or state manager).
|
||||
- **Constructor**:
|
||||
`ExtraPropertiesChangedEventArgs(IList<IExtraProperty> extraProperties, object producer, object consumer)`
|
||||
Initializes a new instance with the specified property list, producer, and consumer. All parameters are required and stored immutably.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- `ExtraProperties` is never `null`; the constructor enforces this by accepting `IList<IExtraProperty>` directly (though the caller must ensure non-null input).
|
||||
- `Producer` and `Consumer` may be `null` (no validation is applied in the constructor), but are semantically expected to be non-null in practice (contextual usage).
|
||||
- The event is *publish-only* on change; it does not support partial updates or delta semantics—subscribers receive the *entire* current list of extra properties.
|
||||
- The `IList<IExtraProperty>` reference is stored directly (no defensive copy), so callers must avoid mutating the list after construction if immutability is desired.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `Microsoft.Practices.Prism.Events` (for `CompositePresentationEvent<T>` base class).
|
||||
- `DTS.Common.Interface.ISO.ExtraProperties` (for `IExtraProperty` interface).
|
||||
- **Depended on by**:
|
||||
- Any module or layer that needs to publish or subscribe to extra property changes (e.g., ISO data adapters, UI components using Prism event aggregation).
|
||||
- Not directly consumed by other *modules* in this file, but its usage is implied by the namespace (`DTS.Common.Events.ISO`) and naming conventions.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No immutability guarantee**: The `ExtraProperties` list is not defensively copied; external mutation of the passed list after construction will affect the event args. Callers should pass an immutable or defensive copy if needed.
|
||||
- **`Producer`/`Consumer` semantics are application-defined**: The interface does not enforce or document what constitutes a valid `producer` or `consumer`. Misuse (e.g., passing `null` or unrelated objects) may lead to ambiguous event tracing.
|
||||
- **No versioning or change metadata**: The event carries only the *current* state of properties, not what changed (e.g., additions/removals). Consumers must diff against prior state if granular change tracking is required.
|
||||
- **No validation on `IExtraProperty` contents**: The list may contain duplicate, invalid, or inconsistent `IExtraProperty` instances—validation (if any) occurs elsewhere.
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Realtime/RealtimeChannelSelectedEvent.cs
|
||||
generated_at: "2026-04-16T02:48:30.854477+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b5b90e6c3d17fb4a"
|
||||
---
|
||||
|
||||
# Realtime
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines the `RealtimeChannelSelectedEvent`, a Prism-based event used to propagate notifications across the application when a realtime communication channel is selected. It serves as a decoupling mechanism in the event-driven architecture, enabling subscribers (e.g., UI components, services, or modules) to react to channel selection changes—such as updating UI state, initializing connections, or switching data streams—without tight coupling to the publisher.
|
||||
|
||||
### 2. **Public Interface**
|
||||
- **`RealtimeChannelSelectedEvent`**
|
||||
- **Type**: `class` (inherits from `CompositePresentationEvent<IRealtimeChannel>`)
|
||||
- **Behavior**: A Prism event token used for publishing and subscribing to channel selection events. When published, it carries an `IRealtimeChannel` instance representing the newly selected channel. Subscribers receive this instance via their event handler.
|
||||
- **Note**: No additional public methods or properties are defined beyond those inherited from `CompositePresentationEvent<TPayload>` (e.g., `Subscribe`, `Publish`, `GetSubscriptionToken`).
|
||||
|
||||
### 3. **Invariants**
|
||||
- The payload passed via `Publish` must be a non-null instance of `IRealtimeChannel` (enforced by convention, though not explicitly validated in this class).
|
||||
- The event is intended for *thread-safe* use within Prism’s event system (i.e., subscriptions/publishing may occur on any thread, with Prism handling dispatch to the UI thread if configured to do so).
|
||||
- The event payload type is strictly `IRealtimeChannel`; no other types are supported.
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Interface.Realtime.IRealtimeChannel` (interface defining the realtime channel contract)
|
||||
- `Microsoft.Practices.Prism.Events.CompositePresentationEvent<T>` (Prism event infrastructure)
|
||||
- **Used by**:
|
||||
- Components that publish channel selection changes (e.g., a channel manager or UI view model).
|
||||
- Subscribers (e.g., data handlers, logging modules, or UI elements) that need to respond to channel changes.
|
||||
*(Exact consumers are not visible in this file but are implied by the event’s purpose.)*
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No explicit validation**: The class does not validate the `IRealtimeChannel` payload; subscribers must handle null or invalid channel states defensively.
|
||||
- **Lifetime management**: Subscribers must manually unsubscribe (e.g., via `SubscriptionToken`) to avoid memory leaks—especially critical for long-lived subscribers (e.g., views) in Prism’s event system.
|
||||
- **Thread-safety assumptions**: While Prism’s `CompositePresentationEvent` handles thread dispatch, the behavior depends on the application’s Prism configuration (e.g., `ThreadOption.PublisherThread` vs. `UIThread`).
|
||||
- **Naming ambiguity**: The class name `RealtimeChannelSelectedEvent` implies selection *triggered by user action*, but the source does not clarify whether it is also used for programmatic channel changes.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/RegionOfInterest/RegionOfInterestChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:47:49.374454+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a47f2325776df1cf"
|
||||
---
|
||||
|
||||
# RegionOfInterest
|
||||
|
||||
1. **Purpose**
|
||||
This module defines a Prism `CompositePresentationEvent`-based event (`RegionOfInterestChangedEvent`) used to publish and subscribe to notifications when a region of interest (ROI) changes within the system. It serves as the messaging mechanism in the event-driven architecture to decouple components that generate or consume ROI updates—enabling loose coupling between ROI management logic and UI or processing modules that react to ROI changes.
|
||||
|
||||
2. **Public Interface**
|
||||
- **`RegionOfInterestChangedEvent`**
|
||||
- *Type*: `class` (inherits from `CompositePresentationEvent<IRegionOfInterest>`)
|
||||
- *Behavior*: A Prism event type used for publishing and subscribing to ROI change notifications. When published, the event carries an `IRegionOfInterest` instance representing the new or updated region of interest. Subscribers receive the payload via their event handler.
|
||||
|
||||
3. **Invariants**
|
||||
- The event payload is guaranteed to be of type `IRegionOfInterest` (as per the generic parameter of the base class).
|
||||
- The event must be published only with a non-null `IRegionOfInterest` instance (though the source does not enforce this at compile time; runtime enforcement would depend on publisher code).
|
||||
- As a `CompositePresentationEvent`, it supports multiple subscribers and thread-safe publication/subscription (per Prism’s implementation), but ordering of subscriber invocation is not guaranteed.
|
||||
|
||||
4. **Dependencies**
|
||||
- **External Dependencies**:
|
||||
- `Microsoft.Practices.Prism.Events` — provides the `CompositePresentationEvent<T>` base class.
|
||||
- `DTS.Common.Interface.RegionOfInterest` — defines the `IRegionOfInterest` interface used as the event payload.
|
||||
- **Depended upon by**:
|
||||
- Any module or component that needs to react to ROI changes (e.g., UI views, analysis pipelines) will subscribe to this event.
|
||||
- ROI management components (e.g., ROI editors, trackers) are expected to publish this event when an ROI is modified.
|
||||
|
||||
5. **Gotchas**
|
||||
- The class is a *pure event definition*—it contains no logic, validation, or helper methods. All behavior (e.g., payload construction, null checks) resides in the publisher/consumer code.
|
||||
- No explicit documentation is present about whether the event is intended for *synchronous* or *asynchronous* use; Prism’s `CompositePresentationEvent` defaults to synchronous dispatch on the calling thread unless configured otherwise (e.g., via `ThreadOption.Background` in subscription), but this is not specified here.
|
||||
- The event name `RegionOfInterestChangedEvent` suggests a *change* occurred, but the payload is the *current* ROI state—not a diff or delta. Consumers must infer what changed by comparing with prior state if needed.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/RegionOfInterest/RegionOfInterestChannels/RegionOfInterestChannelsSelectedEvent.cs
|
||||
generated_at: "2026-04-16T02:48:50.089661+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ab9ac5458ba58e80"
|
||||
---
|
||||
|
||||
# RegionOfInterestChannels
|
||||
|
||||
### 1. Purpose
|
||||
This module defines event types used for broadcasting and subscribing to selections of channels within a specific Region of Interest (ROI) in a Prism-based application. Specifically, it enables decoupled communication where a consumer (e.g., a view model or service) signals that a set of channels has been selected for a given ROI, identified by a suffix. The event is published using Prism’s `CompositePresentationEvent`, supporting both synchronous and asynchronous subscription patterns across modules or layers.
|
||||
|
||||
### 2. Public Interface
|
||||
- **`RegionOfInterestChannelsSelectedEvent`**
|
||||
*Type:* `class` (inherits from `CompositePresentationEvent<RegionOfInterestChannelsSelectedEventArgs>`)
|
||||
*Behavior:* A Prism event used to publish and subscribe to ROI channel selection changes. Subscribers receive an instance of `RegionOfInterestChannelsSelectedEventArgs` containing the selected channels and metadata.
|
||||
|
||||
- **`RegionOfInterestChannelsSelectedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Behavior:* Encapsulates the data payload for the `RegionOfInterestChannelsSelectedEvent`.
|
||||
- **Constructor:**
|
||||
```csharp
|
||||
RegionOfInterestChannelsSelectedEventArgs(string roiSuffix, string[] selectedChannelNames, object o)
|
||||
```
|
||||
Initializes the event args with:
|
||||
- `roiSuffix`: A string identifying the ROI (e.g., `"Brain"`, `"Lesion"`), used to scope the channel selection.
|
||||
- `selectedChannelNames`: An array of channel names (e.g., `["Red", "Green"]`) selected for the ROI.
|
||||
- `o`: The consumer object triggering the event (e.g., a view model instance).
|
||||
- **Properties:**
|
||||
- `RegionOfInterestSuffix`: `string` — read-only; identifies the ROI context.
|
||||
- `ChannelNames`: `string[]` — read-only; the list of selected channel names.
|
||||
- `Consumer`: `object` — read-only; the object responsible for raising the event.
|
||||
|
||||
### 3. Invariants
|
||||
- `RegionOfInterestSuffix` and `ChannelNames` are non-null (enforced by constructor; no null checks are present in the source, implying callers must supply valid values).
|
||||
- `ChannelNames` is expected to be a non-empty array in typical usage (though not enforced by this class—consumers must validate).
|
||||
- The `Consumer` property is non-null in practice (as it is passed directly from the constructor argument `o`), but the class does not enforce this.
|
||||
- The event is *publish-only*—no built-in mechanism for acknowledgment or cancellation.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `Microsoft.Practices.Prism.Events` (for `CompositePresentationEvent`)
|
||||
- `Microsoft.Practices.Prism.Regions` (imported but *not used* in this file—likely a legacy or placeholder import)
|
||||
- `System` (implicitly via `string`, `object`, `string[]`)
|
||||
- **Used by:**
|
||||
- Other modules in the `DTS.Common.Events.RegionOfInterest.RegionOfInterestChannels` namespace (inferred from namespace structure).
|
||||
- Any Prism module that needs to publish or subscribe to ROI channel selection events (e.g., UI components, analysis services).
|
||||
|
||||
### 5. Gotchas
|
||||
- **No validation in constructor:** The class does not validate `roiSuffix`, `selectedChannelNames`, or `o` for null or emptiness, risking `NullReferenceException` or invalid state at runtime if callers are not disciplined.
|
||||
- **`Prism.Regions` import is unused:** The `using Microsoft.Practices.Prism.Regions;` statement is present but irrelevant—suggests possible copy-paste artifact or incomplete refactoring.
|
||||
- **`Consumer` is untyped:** Using `object` for `Consumer` makes it unclear what contract the consumer is expected to adhere to (e.g., interface requirements), increasing coupling risk.
|
||||
- **No immutability guarantee for `ChannelNames`:** While the property is read-only, the underlying array reference is mutable—subscribers could observe side effects if the caller retains and mutates the array after construction.
|
||||
- **No documentation on ROI suffix semantics:** The meaning of `RegionOfInterestSuffix` (e.g., allowed values, naming conventions) is not defined here—consumers must infer from context or external documentation.
|
||||
@@ -0,0 +1,67 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Sensors/CalibrationBehaviorSettingChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Sensors/SensorFilterTypeChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:47:19.043189+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6c4242c9e13326a0"
|
||||
---
|
||||
|
||||
# Sensors
|
||||
|
||||
## Documentation: Sensor Event Definitions
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to propagate changes in sensor configuration and filtering behavior across the application. Specifically, it enables decoupled components to react to changes in calibration behavior settings (`CalibrationBehaviorSettingChangedEvent`) and sensor filter type selections (`SensorFilterTypeChangedEvent`), which may involve ISO code mappings or filter class assignments. These events support dynamic UI updates and state synchronization in sensor data processing pipelines.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `CalibrationBehaviorSettingChangedEvent`
|
||||
- **Type**: `class` (inherits from `CompositePresentationEvent<CalibrationBehaviors>`)
|
||||
- **Generic Payload**: `DTS.Common.Enums.Sensors.CalibrationBehaviors`
|
||||
- **Behavior**: Publishes when the global or context-specific calibration behavior setting changes. Subscribers receive the new `CalibrationBehaviors` enum value.
|
||||
|
||||
#### `SensorFilterTypeChangedEvent`
|
||||
- **Type**: `class` (inherits from `CompositePresentationEvent<SensorFilterTypeChangedEventArgs>`)
|
||||
- **Payload**: `SensorFilterTypeChangedEventArgs`
|
||||
- **Behavior**: Publishes when the sensor filter type (either ISO code character or filter class) is modified. Triggers updates to ISO code lists or filter logic.
|
||||
|
||||
##### `SensorFilterTypeChangedEventArgs`
|
||||
- **Properties**:
|
||||
- `char ISOCodeChar`: Set only when `EventType == EventTypes.ISOCodeChar`. Represents the selected ISO code character (e.g., `'A'`, `'B'`).
|
||||
- `enum EventTypes { ISOCodeChar, FilterClass }`: Indicates which constructor was used to initialize the instance.
|
||||
- `FilterClassType FilterClass`: Set only when `EventType == EventTypes.FilterClass`. Represents the selected filter class.
|
||||
- `ISensorCalibration Calibration`: The calibration object associated with the sensor at the time of change.
|
||||
- `ISensorData Sensor`: The sensor instance whose filter type is changing.
|
||||
- `bool UseISOCodeFilterMapping`: Flag indicating whether ISO code–based filtering is enabled.
|
||||
- `bool UseZeroForUnfiltered`: Flag indicating whether unfiltered readings should be represented as `0`.
|
||||
- **Constructors**:
|
||||
- `SensorFilterTypeChangedEventArgs(char code, ISensorData sensor, ISensorCalibration sensorCalibration, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)`
|
||||
Initializes for ISO code changes (`EventType = ISOCodeChar`).
|
||||
- `SensorFilterTypeChangedEventArgs(FilterClassType filterClassType, ISensorData sensor, ISensorCalibration sensorCalibration, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)`
|
||||
Initializes for filter class changes (`EventType = FilterClass`).
|
||||
|
||||
### 3. Invariants
|
||||
- `SensorFilterTypeChangedEventArgs` must be constructed using **exactly one** of its two constructors—never both parameters sets.
|
||||
- `EventType` is set at construction time and **never changes**; it determines which of `ISOCodeChar` or `FilterClass` is valid.
|
||||
- `ISOCodeChar` is only meaningful when `EventType == EventTypes.ISOCodeChar`; otherwise, its value is undefined (but not null-checked, as `char` is non-nullable).
|
||||
- `FilterClass` is only meaningful when `EventType == EventTypes.FilterClass`.
|
||||
- `Calibration`, `Sensor`, `UseISOCodeFilterMapping`, and `UseZeroForUnfiltered` are always set in both constructors and must be non-null (except `Calibration`/`Sensor` could be `null` if passed as such—no explicit validation is present in the source).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `Microsoft.Practices.Prism.Events.CompositePresentationEvent<T>` (for event infrastructure).
|
||||
- `DTS.Common.Enums.Sensors` (for `CalibrationBehaviors` and `SensorFilterTypeChangedEventArgs.EventTypes`).
|
||||
- `DTS.Common.Interface.Sensors` (for `ISensorCalibration` and `ISensorData` interfaces).
|
||||
- **Used by**:
|
||||
- Components that subscribe to `CalibrationBehaviorSettingChangedEvent` to adjust calibration logic.
|
||||
- Components that subscribe to `SensorFilterTypeChangedEvent` to recompute ISO code mappings, filter tables, or UI filter controls.
|
||||
- Likely consumed by sensor UI modules, data processing pipelines, or configuration managers (inferred from event semantics).
|
||||
|
||||
### 5. Gotchas
|
||||
- `SensorFilterTypeChangedEventArgs` does not validate that `ISOCodeChar` is a valid ISO code character (e.g., range or allowed set). Consumers must enforce this.
|
||||
- The `FilterClass` property is of type `FilterClassType`, but its definition is not included in the provided source—its valid values and semantics are unknown here.
|
||||
- `Calibration` and `Sensor` are passed as interfaces but may be `null` if passed as such in the constructor; no null-checking is evident in this class.
|
||||
- The namespace `DTS.Common.Events.Sensors` is used for `SensorFilterTypeChangedEvent`, while `CalibrationBehaviorSettingChangedEvent` resides in the parent `DTS.Common.Events` namespace—this may cause discoverability issues.
|
||||
- The `bUseZeroForUnfiltered` parameter name uses Hungarian notation (`b` prefix), inconsistent with C# naming conventions (though preserved in the source).
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Sensors/SensorsList/SensorsListSensorSelectedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Sensors/SensorsList/SensorChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:48:55.256595+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3ae767ae71f8e4ec"
|
||||
---
|
||||
|
||||
# SensorsList
|
||||
|
||||
## Documentation: Sensors List Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used for inter-module communication within the DTS application related to sensor management in the Sensors List UI. It enables decoupled notification of sensor selection, changes to sensor properties (e.g., sensitivity, excitation, nonlinearity), and sensor lifecycle events (addition/update). These events facilitate synchronization across UI components and business logic layers without tight coupling—specifically supporting scenarios such as saving sensor configurations, updating filter selections, and responding to user edits in sensor settings.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`SensorsListSensorSelectedEvent`**
|
||||
*Inherits from:* `CompositePresentationEvent<string[]>`
|
||||
*Behavior:* Published when a sensor (or sensors) is selected in the Sensors List UI. The payload is an array of strings—interpreted as serial numbers of the selected sensors (based on naming and usage context, though not explicitly documented in source).
|
||||
|
||||
- **`SensorSavedEvent`**
|
||||
*Inherits from:* `CompositePresentationEvent<double>`
|
||||
*Behavior:* Published after a new sensor is added via the settings menu (per comment referencing FB 13120). The payload is a `double`, likely representing the database ID or timestamp of the newly saved sensor (exact meaning not documented in source).
|
||||
|
||||
- **`SensorUpdatedEvent`**
|
||||
*Inherits from:* `CompositePresentationEvent<bool>`
|
||||
*Behavior:* Published when a sensor is added or deleted, to notify consumers (e.g., filter list UI) to re-evaluate or update the default filter selection. The `bool` payload likely indicates success or some state flag, but its precise semantics are not documented.
|
||||
|
||||
- **`SensorChangedEvent`**
|
||||
*Inherits from:* `CompositePresentationEvent<SensorChangedArgs>`
|
||||
*Behavior:* Published when a user modifies a sensor property in the UI (e.g., sensitivity, excitation, nonlinearity). Triggers dependent UI updates (e.g., sensitivity controls). Payload is a `SensorChangedArgs` object describing which properties changed.
|
||||
|
||||
- **`SensorChangedArgs`**
|
||||
*Fields:*
|
||||
- `SerialNumber` (`string`): Serial number of the changed sensor (currently unused, reserved for future use).
|
||||
- `DatabaseId` (`int`): Database ID of the changed sensor (currently unused, reserved for future use).
|
||||
- `CurrentModelLoading` (`bool`): `true` if the current model is being loaded.
|
||||
- `NonLinearChanged` (`bool`): `true` if the nonlinear calibration setting changed.
|
||||
- `SensitivityChanged` (`bool`): `true` if the sensitivity value changed.
|
||||
- `IsProportionalChanged` (`bool`): `true` if the proportionality setting changed.
|
||||
- `ExcitationChanged` (`bool`): `true` if the excitation setting changed.
|
||||
*Constructor:* `SensorChangedArgs(string serialNumber, int databaseId, bool currentModelLoading, bool nonLinearChanged, bool sensitivityChanged, bool isProportionalChanged, bool excitationChanged)`
|
||||
|
||||
### 3. Invariants
|
||||
- All events derive from `CompositePresentationEvent<T>` (Prism), implying they support subscription on any thread and marshaling to the UI thread via `ThreadOption.UIThread` (default behavior), though the source does not specify subscription options.
|
||||
- The `SensorChangedArgs` payload is immutable: all properties have `private set` (implicitly via auto-property with only `get`), and the constructor enforces initialization of all fields.
|
||||
- The `SerialNumber` and `DatabaseId` fields are *not currently used* (per comments), so consumers must not rely on them for active logic.
|
||||
- The `bool` payloads in `SensorSavedEvent` and `SensorUpdatedEvent` lack explicit semantic documentation; their meaning is inferred from usage context and may be ambiguous.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation).
|
||||
- Namespace `DTS.Common.Events.Sensors.SensorsList` (self-contained; no external module dependencies beyond Prism).
|
||||
- **Dependencies *on* this module:**
|
||||
- UI components handling sensor list selection (subscribe to `SensorsListSensorSelectedEvent`).
|
||||
- Sensor configuration/save logic (publishes `SensorSavedEvent`).
|
||||
- Filter list UI or related components (subscribe to `SensorUpdatedEvent`).
|
||||
- Sensitivity/excitation control panels or validation logic (subscribe to `SensorChangedEvent`).
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading documentation:** The XML comment for `SensorsListSensorSelectedEvent` incorrectly states it is the `TTSImportSummaryImportEvent` and describes an "Import button" scenario—this is clearly a copy-paste error and does not match the class name or usage context.
|
||||
- **Ambiguous payloads:**
|
||||
- `SensorSavedEvent` uses `double` for its payload without documentation—this could be a database ID, timestamp, or other numeric identifier.
|
||||
- `SensorUpdatedEvent` uses `bool` without specifying what `true`/`false` signifies (e.g., success/failure, add/delete).
|
||||
- **Unused fields:** `SerialNumber` and `DatabaseId` in `SensorChangedArgs` are explicitly marked as unused; consumers should ignore them until future use is documented.
|
||||
- **No validation guarantees:** The source provides no indication of validation on `SensorChangedArgs` constructor inputs (e.g., whether `SerialNumber` can be `null`, or `DatabaseId` negative). Consumers should assume inputs are accepted as-is.
|
||||
- **No ordering guarantees:** As Prism events, subscribers receive notifications in the order they subscribed, but no cross-event ordering (e.g., between `SensorChangedEvent` and `SensorUpdatedEvent`) is implied or documented.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/TSRAIRGo/NavigateToDashboard.cs
|
||||
- Common/DTS.CommonCore/Events/TSRAIRGo/NavigateFromTSRAIRGoToDataPRO.cs
|
||||
- Common/DTS.CommonCore/Events/TSRAIRGo/GlobalStatus.cs
|
||||
- Common/DTS.CommonCore/Events/TSRAIRGo/Trigger.cs
|
||||
- Common/DTS.CommonCore/Events/TSRAIRGo/Arm.cs
|
||||
generated_at: "2026-04-16T02:48:11.814347+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1820aad4390a7494"
|
||||
---
|
||||
|
||||
# TSRAIRGo
|
||||
|
||||
## Documentation: TSRAIRGo Event Definitions
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based pub/sub events used for inter-module communication within the TSRAIRGo application domain. These events facilitate decoupled navigation, system state signaling (e.g., arm/disarm), and status updates across loosely coupled UI and service components. The events follow the `CompositePresentationEvent<T>` pattern from the Prism Library, enabling thread-safe subscription and publication across UI and background threads.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
| Type | Signature | Behavior |
|
||||
|------|-----------|----------|
|
||||
| `NavigateToDashboardEvent` | `public class NavigateToDashboardEvent : CompositePresentationEvent<NavigateToDashboardArg>` | Event published to request navigation to the Dashboard view. Payload type `NavigateToDashboardArg` is currently empty. |
|
||||
| `NavigateFromTSRAIRGoToDataPROEvent` | `public class NavigateFromTSRAIRGoToDataPROEvent : CompositePresentationEvent<NavigateFromTSRAIRGoToDataPROArg>` | Event published to request navigation from the TSRAIRGo module to the DataPRO module. Payload type `NavigateFromTSRAIRGoToDataPROArg` is currently empty. |
|
||||
| `GlobalStatusEvent` | `public class GlobalStatusEvent : CompositePresentationEvent<GlobalStatusArg>` | Event published to broadcast a global status message (e.g., system health, progress, or error state). Payload type `GlobalStatusArg` contains a `Message` string property. |
|
||||
| `TriggerEvent` | `public class TriggerEvent : CompositePresentationEvent<TriggerArg>` | Event published to signal a generic trigger action. Payload type `TriggerArg` is currently empty. |
|
||||
| `ArmEvent` | `public class ArmEvent : CompositePresentationEvent<ArmArg>` | Event published to arm or disarm a system component (e.g., data acquisition, safety interlocks). Payload type `ArmArg` contains a single `bool Arm` property indicating the desired state (`true` = arm, `false` = disarm). |
|
||||
|
||||
### 3. Invariants
|
||||
- All event types inherit from `CompositePresentationEvent<T>`, meaning they support cross-thread publication and subscription (thread-safe for UI and background threads).
|
||||
- Payload argument classes (`*Arg`) must be instantiated before publishing; null payloads are not explicitly guarded against in this module, so subscribers must handle null or validate payload contents.
|
||||
- For `GlobalStatusArg`, the `Message` property is nullable (`string`); no validation or formatting guarantees are enforced by this module.
|
||||
- For `ArmArg`, the `Arm` property is a `bool`; no semantic validation (e.g., range checks) is performed—consumers must interpret `true`/`false` consistently.
|
||||
- No ordering guarantees are provided for event subscribers; multiple subscribers may receive events in arbitrary order.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies (imports):**
|
||||
- `Microsoft.Practices.Prism.Events` (Prism Library v6 or earlier; note use of `Microsoft.Practices.Prism` namespace, indicating legacy Prism version)
|
||||
- `System`, `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks`, `System.Windows` (only in `Trigger.cs`, likely unused—possibly leftover from template or tooling)
|
||||
- **Namespace usage:**
|
||||
- Events reside in `DTS.Common.Events` (for `NavigateToDashboardEvent`, `NavigateFromTSRAIRGoToDataPROEvent`) and `DTS.Common.Events.TSRAIRGo` (for `GlobalStatusEvent`, `TriggerEvent`, `ArmEvent`).
|
||||
- **Depended upon by:**
|
||||
- Unknown from source alone—consumers would subscribe to these events via the Prism `EventAggregator`. Likely used by UI modules (e.g., view models, shells) and background services in the TSRAIRGo and DataPRO subsystems.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Empty payload types**: `NavigateToDashboardArg`, `NavigateFromTSRAIRGoToDataPROArg`, and `TriggerArg` contain no properties. If future requirements demand passing data (e.g., destination ID, trigger parameters), modifying these types may break backward compatibility if consumers rely on default instantiation.
|
||||
- **Namespace inconsistency**: `NavigateToDashboardEvent` and `NavigateFromTSRAIRGoToDataPROEvent` are in `DTS.Common.Events`, while others are in `DTS.Common.Events.TSRAIRGo`. This suggests possible refactoring in progress or legacy grouping; developers should verify intended scoping.
|
||||
- **Unused `System.Windows` reference**: `Trigger.cs` imports `System.Windows` but does not use it—may indicate dead code or accidental inclusion.
|
||||
- **No documentation on event semantics**: The source provides no guidance on when each event should be published (e.g., pre- vs. post-condition), leading to potential misuse (e.g., publishing `ArmEvent` with `Arm=false` when system is already disarmed).
|
||||
- **No versioning or deprecation markers**: No indication of whether these events are stable, experimental, or deprecated.
|
||||
|
||||
None identified from source alone beyond the above.
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportSavedChangesStatusEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/StatusAndProgressBarEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportSummaryRunTestEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportTestSetupChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/AssignedChannelsChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportHardwareScanRunEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportSummaryImportEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportReadFileFinishedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportArmedRunTestEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportHardwareScanFinishedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/EIDMappingEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportReadFileStatusEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TTSImport/TTSImportReadXMLFileEvent.cs
|
||||
generated_at: "2026-04-16T02:48:30.472302+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "429a14fc6889c232"
|
||||
---
|
||||
|
||||
# TTS Import Events Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of Prism-based events used for inter-component communication within the TTS (Time-to-Sync) import workflow. These events coordinate state transitions and data flow across UI steps (e.g., Read File, Hardware Scan, Summary) and background operations (e.g., file parsing, hardware pinging), enabling loose coupling between view models and services in the application’s import pipeline. The events are published and subscribed to using the `CompositePresentationEvent<T>` base class from Prism, supporting cross-thread delivery and subscription lifetime management.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Event Classes
|
||||
All events inherit from `CompositePresentationEvent<T>` and are defined in the `DTS.Common.Events` or `DTS.Common.Events.TTSImport` namespaces.
|
||||
|
||||
| Event Name | Payload Type | Behavior |
|
||||
|------------|--------------|----------|
|
||||
| `TTSImportSavedChangesStatusEvent` | `bool` | Indicates whether changes have been saved (`true`) or not (`false`). |
|
||||
| `StatusAndProgressBarEvent` | `StatusAndProgressBarEventArgs` | Updates status text and/or progress bar UI elements. *(Note: `StatusAndProgressBarEventArgs` is defined in `DTS.Common.Classes` but not included in source; behavior inferred from remarks.)* |
|
||||
| `TTSImportSummaryRunTestEvent` | `ITTSSetup` | Triggered by the Summary step to instruct the page to execute the test. |
|
||||
| `TTSImportTestSetupChangedEvent` | `ITTSSetup` | Published whenever the current `ITTSSetup` instance is modified. |
|
||||
| `AssignedChannelsChangedEvent` | `ITTSSetup` | Published whenever the set of channels assigned to the test setup changes. |
|
||||
| `TTSImportHardwareScanRunEvent` | `ITTSSetup` | Triggered by the Hardware Scan step to initiate hardware pinging. |
|
||||
| `TTSImportSummaryImportEvent` | `ITTSSetup` | Published by the Summary step when the Import button is clicked. |
|
||||
| `TTSImportReadFileFinishedEvent` | `ITTSSetup` | Published by the Read File step upon completion of file reading. |
|
||||
| `TTSImportHardwareScanFinishedEvent` | `List<IDASHardware>` | Published by the page to notify the Hardware Scan view model to refresh the list of DAS (Data Acquisition System) hardware. |
|
||||
| `EIDMappingEvent` | `IDictionary<string, string>` | Published when a mapping from sensor IDs to hardware channel IDs is determined. Keys = sensor IDs, values = hardware channel IDs. |
|
||||
| `TTSImportReadFileStatusEvent` | `ReadFileStatusArg` | Reports success/failure of file read: `Status` indicates outcome; `TTSSetup` contains parsed setup if successful; `ErrorMessage` contains failure reason if `Status` is `false`. |
|
||||
| `TTSImportReadXMLFileRequestEvent` | `TTSImportReadXMLFileRequestArg` | Requests XML file parsing: `FilePath` and `TestSetup` (preliminary) are provided. |
|
||||
| `TTSImportReadXMLFileResponseEvent` | `TTSImportReadXMLFileResponseEventArg` | Response to XML read request: includes updated `ITestSetup`, `TTSSetup`, `Errors[]`, and `LevelTriggers[]`. |
|
||||
|
||||
### Argument Classes
|
||||
| Class | Fields | Purpose |
|
||||
|-------|--------|---------|
|
||||
| `ReadFileStatusArg` | `bool Status`, `ITTSSetup TTSSetup`, `string ErrorMessage` | Encapsulates result of file read operation. |
|
||||
| `TTSImportReadXMLFileRequestArg` | `string FilePath`, `ITTSSetup TestSetup` | Request payload for XML file read. |
|
||||
| `TTSImportReadXMLLevelTrigger` | `double Threshold`, `string SensorSerialNumber` | Represents a level trigger configuration parsed from XML. |
|
||||
| `TTSImportReadXMLFileResponseEventArg` | `ITestSetup TestSetup`, `string[] Errors`, `ITTSSetup TTSSetup`, `TTSImportReadXMLLevelTrigger[] LevelTriggers` | Response payload after XML parsing. |
|
||||
|
||||
## 3. Invariants
|
||||
- All events are published using Prism’s event aggregation mechanism (`CompositePresentationEvent<T>`), implying they support thread marshaling and subscription lifetime management via `EventSubscription` tokens.
|
||||
- Payload types (`ITTSSetup`, `ITestSetup`, `IDASHardware`) are interfaces defined in external modules (`DTS.Common.Interface.*`).
|
||||
- `ReadFileStatusArg.Status == true` implies `TTSSetup != null` and `ErrorMessage == null` (or empty); `Status == false` implies `ErrorMessage != null`. *(Inferred from remarks; no explicit validation in source.)*
|
||||
- `TTSImportReadXMLFileRequestArg` and `TTSImportReadXMLFileResponseEventArg` are immutable (all properties have `private set` or are `readonly`-equivalent via constructor initialization).
|
||||
- `EIDMappingEvent` payload is a mapping from sensor ID → hardware channel ID (both `string`). Order is not guaranteed (uses `IDictionary`).
|
||||
|
||||
## 4. Dependencies
|
||||
### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation)
|
||||
- `DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile` (provides `ITTSSetup`, `ITTSSetup` interfaces)
|
||||
- `DTS.Common.Interface.TestSetups.TestSetupsList` (provides `ITestSetup` interface)
|
||||
- `DTS.Common.Interface.DataRecorders` (provides `IDASHardware` interface)
|
||||
- `DTS.Common.Classes` (provides `StatusAndProgressBarEventArgs` for `StatusAndProgressBarEvent`)
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- View models and services involved in the TTS import workflow (e.g., `ReadFileViewModel`, `HardwareScanViewModel`, `SummaryViewModel`) are expected to subscribe to these events.
|
||||
- No other modules *define* these events; this module is the sole source.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Namespace inconsistency**: Most events reside in `DTS.Common.Events`, but `TTSImportTestSetupChangedEvent` and `AssignedChannelsChangedEvent` are in `DTS.Common.Events.TTSImport`. This may cause subscription failures if subscribers use incorrect namespace resolution.
|
||||
- **Ambiguous `StatusAndProgressBarEventArgs`**: The type `StatusAndProgressBarEventArgs` is referenced but not defined in the provided source; its structure and behavior cannot be determined.
|
||||
- **Redundant naming**: `TTSImportReadXMLFileRequestEvent` vs. `TTSImportReadXMLFileEvent` (not present) — the naming pattern (`*RequestEvent`/`*ResponseEvent`) is inconsistent with other events (e.g., `TTSImportReadFileStatusEvent` instead of `TTSImportReadFileRequestEvent`).
|
||||
- **No cancellation support**: Events like `TTSImportHardwareScanRunEvent` lack a cancellation token or request ID, making it difficult to handle overlapping or aborted operations.
|
||||
- **`ReadFileStatusArg` error handling**: `ErrorMessage` is only populated on failure, but its type (`string`) allows empty strings — consumers must check `Status` first to avoid misinterpreting empty messages.
|
||||
- **`ITTSSetup` vs `ITestSetup`**: Both interfaces appear in responses (e.g., `TTSImportReadXMLFileResponseEventArg`), but their relationship (inheritance, composition) is not specified in the source.
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/TestSetups/TestSetupsList/CurrentTestIdChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TestSetups/TestSetupsList/CurrentTestChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TestSetups/TestSetupsList/TestSetupsListEditTestSetupEvent.cs
|
||||
- Common/DTS.CommonCore/Events/TestSetups/TestSetupsList/TestSetupsListTestSetupSelectedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:37.794496+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0a7d14a1bfb658a4"
|
||||
---
|
||||
|
||||
# TestSetupsList
|
||||
|
||||
## Documentation: TestSetupsList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based events used to coordinate state and user actions within the *Test Setups List* feature of the system. Specifically, it enables decoupled communication between UI components (e.g., a test list view and detail editors) regarding changes to the currently selected or edited test setup, as well as user-initiated actions like selecting or editing a test setup. All events are strongly typed subclasses of `CompositePresentationEvent<TPayload>` and carry string or string array payloads to identify test setups.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
| Event Class | Payload Type | Behavior |
|
||||
|-------------|--------------|----------|
|
||||
| `CurrentTestIdChangedEvent` | `string` | Signals that the *ID* of the current test setup has changed. Payload is the new test setup ID (or `null` if none). |
|
||||
| `CurrentTestChangedEvent` | `string` | Signals that the *entire current test setup* (not just its ID) has changed. Payload is the test setup ID of the new current test setup (or `null` if none). |
|
||||
| `TestSetupsListEditTestSetupEvent` | `string` | Fires when the user requests to edit a specific test setup. Payload is the ID of the test setup to be edited. |
|
||||
| `TestSetupsListTestSetupSelectedEvent` | `string[]` | Fires when one or more test setups are selected (e.g., via UI). Payload is an array of test setup IDs representing the selected items. |
|
||||
|
||||
> **Note**: All events inherit from `Microsoft.Practices.Prism.Events.CompositePresentationEvent<T>`, meaning they support subscription from multiple views/modules and are published on the UI thread by default (Prism behavior).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **Payload semantics**:
|
||||
- For events with `string` payload (`CurrentTestIdChangedEvent`, `CurrentTestChangedEvent`, `TestSetupsListEditTestSetupEvent`), the payload is expected to be a valid test setup ID (non-empty string) when indicating a real selection/edit. A `null` or empty string may indicate "no current test" or "clear selection", though this is not explicitly documented and must be inferred from usage.
|
||||
- For `TestSetupsListTestSetupSelectedEvent`, the payload is a non-null array of test setup IDs (though the array may be empty to indicate deselection).
|
||||
|
||||
- **Event ordering**:
|
||||
- No guaranteed ordering between event publication and handling. Subscribers must be prepared to handle events asynchronously.
|
||||
- `CurrentTestChangedEvent` *may* imply `CurrentTestIdChangedEvent` in typical usage, but this is **not enforced** by the event definitions themselves.
|
||||
|
||||
- **No validation**:
|
||||
- The events themselves perform no validation on payload contents (e.g., no check for existence or format of test setup IDs). Validation is the responsibility of subscribers.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
- **Dependencies *of* this module**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library, version not specified).
|
||||
- Namespace `DTS.Common.Events.TestSetups.TestSetupsList` (internal to the codebase).
|
||||
|
||||
- **Dependencies *on* this module**:
|
||||
- Any module/view responsible for managing the test setups list UI (e.g., a list view, editor dialog, or summary step) likely subscribes to or publishes these events.
|
||||
- Specifically, the *Summary step* is documented to publish `TestSetupsListTestSetupSelectedEvent` (see comment in `TestSetupsListTestSetupSelectedEvent.cs`).
|
||||
- Other modules (e.g., test setup detail view, edit dialog) likely subscribe to `TestSetupsListEditTestSetupEvent` or `CurrentTestChangedEvent`.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Naming inconsistency**:
|
||||
- The class `TestSetupsListTestSetupSelectedEvent` has a misleading summary comment: it incorrectly refers to `TTSImportSummaryImportEvent` in its `<summary>` tag. This appears to be a copy-paste error and may cause confusion during documentation review.
|
||||
|
||||
- **Ambiguous semantics of `CurrentTestIdChangedEvent` vs `CurrentTestChangedEvent`**:
|
||||
- The distinction between "ID changed" and "test changed" is not clarified in the source. In practice, if only the ID changes (e.g., due to renaming), does `CurrentTestChangedEvent` fire? The source does not specify. Subscribers should assume both events may fire independently and handle accordingly.
|
||||
|
||||
- **No payload validation or error signaling**:
|
||||
- Events carry no error or status metadata. If a subscriber cannot act on a payload (e.g., invalid ID), it must handle failure silently or via separate mechanisms (e.g., logging, exceptions, or additional events).
|
||||
|
||||
- **String-based IDs are fragile**:
|
||||
- Using `string` (and `string[]`) as the payload type offers no compile-time safety. Typos or ID mismatches (e.g., mixing internal vs. external IDs) could lead to runtime errors.
|
||||
|
||||
- **No deprecation or lifecycle guidance**:
|
||||
- No indication of whether these events are stable, deprecated, or subject to change. Subscribers should assume they are part of the stable public API unless otherwise documented elsewhere.
|
||||
|
||||
None identified beyond the above.
|
||||
Reference in New Issue
Block a user