46 lines
2.6 KiB
Markdown
46 lines
2.6 KiB
Markdown
---
|
|
source_files:
|
|
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/NavigationModule.cs
|
|
generated_at: "2026-04-17T16:45:37.366507+00:00"
|
|
model: "zai-org/GLM-5-FP8"
|
|
schema_version: 1
|
|
sha256: "2085d49a3bec9fca"
|
|
---
|
|
|
|
# NavigationModule Documentation
|
|
|
|
## 1. Purpose
|
|
|
|
This module serves as the Prism-based navigation component for the DTS Viewer application. It is responsible for registering the navigation view and view-model with the Unity dependency injection container and providing assembly-level metadata (name, image, region, and group) that the main application uses to display and categorize available modules. The module follows the Prism modularity pattern and integrates with the larger DTS Viewer shell.
|
|
|
|
---
|
|
|
|
## 2. Public Interface
|
|
|
|
### `NavigationModule` Class
|
|
Implements `Prism.Modularity.IModule`. The primary module entry point.
|
|
|
|
| Member | Signature | Description |
|
|
|--------|-----------|-------------|
|
|
| Constructor | `NavigationModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
|
|
| `Initialize` | `void Initialize()` | Registers `INavigationView` → `NavigationView` and `INavigationViewModel` → `NavigationViewModel` with the Unity container. |
|
|
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation (no post-initialization logic). |
|
|
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()` to perform type registration. |
|
|
|
|
### `NavigationPropertiesNameAttribute` Class
|
|
Extends `TextAttribute`. Assembly-level attribute providing the module's display name.
|
|
|
|
| Member | Signature | Description |
|
|
|--------|-----------|-------------|
|
|
| Constructor | `NavigationPropertiesNameAttribute()` | Default constructor; initializes `_assemblyName` to `AssemblyNames.Navigation.ToString()`. |
|
|
| Constructor | `NavigationPropertiesNameAttribute(string s)` | Overload accepting a string parameter (parameter is unused). |
|
|
| `AssemblyName` | `override string AssemblyName { get; }` | Returns `_assemblyName`. |
|
|
| `GetAttributeType` | `override Type GetAttributeType()` | Returns `typeof(TextAttribute)`. |
|
|
| `GetAssemblyName` | `override string GetAssemblyName()` | Returns `AssemblyName` property value. |
|
|
|
|
### `NavigationPropertiesImageAttribute` Class
|
|
Extends `ImageAttribute`. Assembly-level attribute providing the module's image and categorization metadata.
|
|
|
|
| Member | Signature | Description |
|
|
|--------|-----------|-------------|
|
|
| Constructor | `NavigationPropertiesImageAttribute()` | Default constructor; initializes `_img` via `AssemblyInfo.GetImage() |