init
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/ITRLReportInputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/ITRLReportOutputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/IHeadReportInputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/IHeadReportOutputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/ITRLReportViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/IHeadReportViewModel.cs
|
||||
generated_at: "2026-04-16T02:38:08.522173+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "263ef567c8d12f8f"
|
||||
---
|
||||
|
||||
# PedestrianAndHead
|
||||
|
||||
## Documentation Page: Pedestrian and Head Report View/ViewModel Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the core interface contracts for the *Pedestrian and Head Report* subsystem within the DTS reporting framework. It establishes a standardized separation between input and output concerns for two distinct report types—**TRL (Traffic Report Line)** and **Head (likely Headway or Headcount)**—by declaring paired `InputView`/`OutputView` and `ViewModel` interfaces. These interfaces follow the MVVM (Model-View-ViewModel) pattern, enabling decoupled UI composition and testability. The module itself contains no implementation logic; it serves as a contract layer to ensure consistent structure across implementations of these report types.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
All interfaces are defined in the `DTS.Common.Interface` namespace and inherit from `IBaseView` or `IBaseViewModel` (from `DTS.Common.Base`).
|
||||
|
||||
#### Interfaces
|
||||
|
||||
| Interface | Type | Properties | Behavior |
|
||||
|-----------|------|------------|----------|
|
||||
| `ITRLReportInputView` | Interface | — | Marker interface for the *input view* of a TRL report. No additional API beyond `IBaseView`. |
|
||||
| `ITRLReportOutputView` | Interface | — | Marker interface for the *output view* of a TRL report. No additional API beyond `IBaseView`. |
|
||||
| `IHeadReportInputView` | Interface | — | Marker interface for the *input view* of a Head report. No additional API beyond `IBaseView`. |
|
||||
| `IHeadReportOutputView` | Interface | — | Marker interface for the *output view* of a Head report. No additional API beyond `IBaseView`. |
|
||||
| `ITRLReportViewModel` | Interface | `ITRLReportInputView InputView { get; set; }`<br>`ITRLReportOutputView OutputView { get; set; }` | ViewModel for TRL reports. Manages references to its input and output views. Inherits from `IBaseViewModel`. |
|
||||
| `IHeadReportViewModel` | Interface | `IHeadReportInputView InputView { get; set; }`<br>`IHeadReportOutputView OutputView { get; set; }` | ViewModel for Head reports. Manages references to its input and output views. Inherits from `IBaseViewModel`. |
|
||||
|
||||
> **Note**: No method signatures are declared in any of these interfaces. Behavior (e.g., data loading, report generation) is expected to be implemented in concrete types and/or via `IBaseView`/`IBaseViewModel` contracts (not shown here).
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- All view interfaces (`ITRLReportInputView`, `ITRLReportOutputView`, `IHeadReportInputView`, `IHeadReportOutputView`) **must** inherit from `IBaseView`.
|
||||
- All viewmodel interfaces (`ITRLReportViewModel`, `IHeadReportViewModel`) **must** inherit from `IBaseViewModel`.
|
||||
- For any `ITRLReportViewModel` instance:
|
||||
- `InputView` **must** be assignable to `ITRLReportInputView`.
|
||||
- `OutputView` **must** be assignable to `ITRLReportOutputView`.
|
||||
- For any `IHeadReportViewModel` instance:
|
||||
- `InputView` **must** be assignable to `IHeadReportInputView`.
|
||||
- `OutputView` **must** be assignable to `IHeadReportOutputView`.
|
||||
- View and viewmodel pairs are strictly scoped: TRL views only bind to `ITRLReportViewModel`, and Head views only bind to `IHeadReportViewModel`.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### Dependencies *of this module*:
|
||||
- `DTS.Common.Base` (specifically, `IBaseView` and `IBaseViewModel` interfaces).
|
||||
- No other modules or libraries are imported.
|
||||
|
||||
#### Dependencies *on this module* (inferred):
|
||||
- Any concrete implementation of `ITRLReportViewModel` or `IHeadReportViewModel` must depend on this module to satisfy the interface contracts.
|
||||
- UI layers or DI containers that instantiate or inject viewmodels (e.g., `ITRLReportViewModel`) will depend on this module.
|
||||
- Modules responsible for constructing or wiring report views (e.g., a report factory or view loader) will depend on these interfaces to decouple from concrete implementations.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **No behavior defined**: These interfaces are *purely structural*—they define *what* views/viewmodels exist, not *how* they behave. Developers must inspect `IBaseView`/`IBaseViewModel` and concrete implementations to understand runtime behavior.
|
||||
- **Ambiguous report semantics**: The meaning of "TRL" and "Head" reports is not documented here. "Head" could refer to headway, headcount, or another domain-specific concept; this must be clarified elsewhere (e.g., in domain documentation or naming conventions).
|
||||
- **No validation or lifecycle hooks**: Since no methods or events are declared, state transitions, validation, or error handling must be handled via `IBaseView`/`IBaseViewModel` or in concrete types—this may lead to inconsistency if not enforced by convention.
|
||||
- **Potential for misuse**: Without explicit constraints, a consumer could assign an `IHeadReportInputView` to an `ITRLReportViewModel.InputView` property at compile time (since both are `IBaseView`), risking runtime errors. Enforcing type safety requires discipline or additional tooling.
|
||||
|
||||
> **None identified from source alone** beyond the above structural caveats.
|
||||
Reference in New Issue
Block a user