40 lines
1.9 KiB
Markdown
40 lines
1.9 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.Common/Events/Diagnostics/CheckDataToDownloadEvent.cs
|
||
|
|
generated_at: "2026-04-17T16:11:09.535998+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "432a82d8ead3203a"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Diagnostics
|
||
|
|
|
||
|
|
### Purpose
|
||
|
|
This module provides a Prism event mechanism for coordinating data download checks within the DTS system. It allows producers to signal when data should be downloaded, with an option to bypass validation checks. The event facilitates communication between components that trigger downloads and components that validate or process download requests.
|
||
|
|
|
||
|
|
### Public Interface
|
||
|
|
|
||
|
|
**`CheckDataToDownloadEvent`**
|
||
|
|
- Signature: `class CheckDataToDownloadEvent : PubSubEvent<CheckDataToDownloadEventArgs>`
|
||
|
|
- Description: A pub/sub event type that carries `CheckDataToDownloadEventArgs` payloads. Subscribers can listen for download check requests and publishers can trigger them.
|
||
|
|
|
||
|
|
**`CheckDataToDownloadEventArgs`**
|
||
|
|
- Signature: `class CheckDataToDownloadEventArgs`
|
||
|
|
- Constructor: `CheckDataToDownloadEventArgs(bool bypassCheck, object o)`
|
||
|
|
- Properties:
|
||
|
|
- `bool BypassCheck { get; }` - Indicates whether validation checks should be skipped.
|
||
|
|
- `object Producer { get; }` - Reference to the object that initiated the check.
|
||
|
|
|
||
|
|
### Invariants
|
||
|
|
- `BypassCheck` and `Producer` are set only at construction and cannot be modified thereafter (private setters).
|
||
|
|
- `Producer` may be `null` if the constructor is called with a null object reference (no null validation in constructor).
|
||
|
|
|
||
|
|
### Dependencies
|
||
|
|
- **Depends on**: `Prism.Events` (for `PubSubEvent<T>` base class)
|
||
|
|
- **Depended on by**: Unknown from source alone (consumers would subscribe/publish this event)
|
||
|
|
|
||
|
|
### Gotchas
|
||
|
|
- The `Producer` parameter is stored as an untyped `object`, requiring runtime type checking by consumers if specific producer types need to be distinguished.
|
||
|
|
- No validation is performed on constructor arguments; callers can pass `null` for the producer.
|
||
|
|
|
||
|
|
---
|