78 lines
2.9 KiB
Markdown
78 lines
2.9 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.Common/Events/DTS.Viewer/Reports/SaveReportToCSVRequestedEvent.cs
|
||
|
|
- Common/DTS.Common/Events/DTS.Viewer/Reports/SaveReportToPDFRequestedEvent.cs
|
||
|
|
generated_at: "2026-04-17T16:38:04.393080+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "0eaf9841175516dd"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: Report Export Events
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module defines two Prism event aggregation types for requesting report exports in the DTS Viewer application. `SaveReportToCSVRequestedEvent` and `SaveReportToPDFRequestedEvent` enable loosely-coupled communication between view models and report generation services, allowing components to request CSV or PDF exports without direct dependencies on each other. Both events carry the target directory path and a reference to the requesting parent view model.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### `SaveReportToCSVRequestedEvent`
|
||
|
|
**Signature:** `public class SaveReportToCSVRequestedEvent : PubSubEvent<SaveReportToCSVRequestedEventArgs>`
|
||
|
|
|
||
|
|
An event type for publishing and subscribing to CSV export requests. Inherits from Prism's `PubSubEvent<T>` and uses `SaveReportToCSVRequestedEventArgs` as its payload type.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `SaveReportToCSVRequestedEventArgs`
|
||
|
|
**Signature:** `public class SaveReportToCSVRequestedEventArgs`
|
||
|
|
|
||
|
|
Payload class carrying data for CSV export requests.
|
||
|
|
|
||
|
|
| Property | Type | Access |
|
||
|
|
|----------|------|--------|
|
||
|
|
| `Directory` | `string` | get; set; |
|
||
|
|
| `ParentVM` | `IBaseViewModel` | get; set; |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `SaveReportToPDFRequestedEvent`
|
||
|
|
**Signature:** `public class SaveReportToPDFRequestedEvent : PubSubEvent<SaveReportToPDFRequestedEventArgs>`
|
||
|
|
|
||
|
|
An event type for publishing and subscribing to PDF export requests. Inherits from Prism's `PubSubEvent<T>` and uses `SaveReportToPDFRequestedEventArgs` as its payload type.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `SaveReportToPDFRequestedEventArgs`
|
||
|
|
**Signature:** `public class SaveReportToPDFRequestedEventArgs`
|
||
|
|
|
||
|
|
Payload class carrying data for PDF export requests.
|
||
|
|
|
||
|
|
| Property | Type | Access |
|
||
|
|
|----------|------|--------|
|
||
|
|
| `Directory` | `string` | get; set; |
|
||
|
|
| `ParentVM` | `IBaseViewModel` | get; set; |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Invariants
|
||
|
|
|
||
|
|
- Both event args classes expose identical property structures (`Directory` and `ParentVM`).
|
||
|
|
- `Directory` is intended to represent a file system path for the export destination.
|
||
|
|
- `ParentVM` must implement `IBaseViewModel` interface from `DTS.Common.Base`.
|
||
|
|
- Properties are mutable (public setters); no constructor-based initialization is enforced.
|
||
|
|
- No null validation or path validation is performed within these classes.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. Dependencies
|
||
|
|
|
||
|
|
**This module depends on:**
|
||
|
|
- `Prism.Events` — Provides `PubSubEvent<T>` base class for event aggregation
|
||
|
|
- `DTS.Common.Base` — Provides `IBaseViewModel` interface
|
||
|
|
|
||
|
|
**Consumers (inferred):**
|
||
|
|
- Any module publishing or subscribing to report export requests via Prism's `IEventAggregator`
|
||
|
|
- Report generation services that handle these events
|
||
|
|
- View models that initiate export operations
|