--- source_files: - DataPRO/Modules/Reports/PedestrianAndHeadReports/PedestrianAndHeadReportsModule.cs generated_at: "2026-04-17T16:47:14.036604+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "5f34559ec2b43579" --- # Documentation: PedestrianAndHeadReportsModule ## 1. Purpose This module is a Prism-based module responsible for registering pedestrian and head report components within the application's Unity dependency injection container. It serves as the entry point for the `PedestrianAndHeadReports` feature area, registering input/output views and their corresponding view models for head reports and TRL (Transport Research Laboratory) reports. The module also provides assembly metadata via a custom attribute for display on the main screen. --- ## 2. Public Interface ### `PedestrianAndHeadReportsModule` Class A Prism module implementation that registers views and view models with the Unity container. **Constructor:** ```csharp public PedestrianAndHeadReportsModule(IUnityContainer unityContainer) ``` - Accepts an `IUnityContainer` instance via dependency injection and stores it in a readonly field `_unityContainer`. **Method:** ```csharp public void Initialize() ``` - Registers the following type mappings with the Unity container: - `IHeadReportInputView` → `HeadReportInputView` - `IHeadReportOutputView` → `HeadReportOutputView` - `IHeadReportViewModel` → `HeadReportViewModel` - `ITRLReportInputView` → `TRLReportInputView` - `ITRLReportOutputView` → `TRLReportOutputView` - `ITRLReportViewModel` → `TRLReportViewModel` --- ### `PedestrianAndHeadReportsImageAttribute` Class An attribute class extending `ImageAttribute` that provides assembly metadata for display in the application's main screen. **Constructor:** ```csharp public PedestrianAndHeadReportsImageAttribute() public PedestrianAndHeadReportsImageAttribute(string s) ``` - Parameterless constructor chains to the string overload with `null`. - The string parameter `s` is accepted but not used in the implementation. **Properties:** | Property | Return Type | Implementation | |----------|-------------|----------------| | `AssemblyImage` | `BitmapImage` | Returns image from `AssemblyInfo.GetImage(AssemblyNames.DB.ToString())` | | `AssemblyName` | `string` | Returns `AssemblyNames.PowerAndBattery.ToString()` | | `AssemblyGroup` | `string` | Returns `eAssemblyGroups.Administrative.ToString()` | | `AssemblyRegion` | `eAssemblyRegion` | Throws `NotImplementedException` | **Methods:** | Method | Return Type | Implementation | |--------|-------------|----------------| | `GetAttributeType()` | `Type` | Returns `typeof(ImageAttribute)` | | `GetAssemblyImage()` | `BitmapImage` | Returns `AssemblyImage` property | | `GetAssemblyName()` | `string` | Returns `AssemblyName` property | | `GetAssemblyGroup()` | `string` | Returns `AssemblyGroup` property | | `GetAssemblyRegion()` | `eAssemblyRegion` | Throws `NotImplementedException` | --- ## 3. Invariants - The `_unityContainer` field is `readonly` and must be provided at construction time. - The `Initialize()` method must be called for any views or view models in this module to be res