38 lines
2.3 KiB
Markdown
38 lines
2.3 KiB
Markdown
---
|
|
source_files:
|
|
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/ChartOptionsModule.cs
|
|
generated_at: "2026-04-17T16:45:35.849303+00:00"
|
|
model: "zai-org/GLM-5-FP8"
|
|
schema_version: 1
|
|
sha256: "dbbe5595baa7b41f"
|
|
---
|
|
|
|
# Documentation: ChartOptionsModule.cs
|
|
|
|
## 1. Purpose
|
|
|
|
This module serves as the Prism module initializer for the `DTS.Viewer.ChartOptions` assembly. Its primary role is to register chart options-related views, view models, and models with the Unity dependency injection container, enabling the DTS Viewer application to discover and load chart configuration functionality. Additionally, it defines assembly-level metadata attributes that expose the module's name, image icon, group classification, and target region to the main application shell.
|
|
|
|
---
|
|
|
|
## 2. Public Interface
|
|
|
|
### `ChartOptionsModule` (class)
|
|
Implements `Prism.Modularity.IModule`. The main module entry point for the ChartOptions feature.
|
|
|
|
| Member | Signature | Description |
|
|
|--------|-----------|-------------|
|
|
| Constructor | `ChartOptionsModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
|
|
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()`. Required by `IModule`. |
|
|
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation. Required by `IModule`. |
|
|
| `Initialize` | `void Initialize()` | Registers three types with Unity: `IChartOptionsView` → `ChartOptionsView`, `IChartOptionsViewModel` → `ChartOptionsViewModel`, `IChartOptionsModel` → `ChartOptionsModel`. |
|
|
|
|
### `ChartOptionsModuleNameAttribute` (class)
|
|
Extends `TextAttribute`. Assembly-level attribute providing the module's name.
|
|
|
|
| Member | Signature | Description |
|
|
|--------|-----------|-------------|
|
|
| Constructor | `ChartOptionsModuleNameAttribute()` | Initializes with `AssemblyName` set to `AssemblyNames.ChartOptions.ToString()`. |
|
|
| Constructor | `ChartOptionsModuleNameAttribute(string s)` | Overload accepting a string parameter (parameter is unused). |
|
|
| `AssemblyName` | `override string AssemblyName { get; }` | Returns `AssemblyNames.ChartOptions.ToString()`. |
|
|
| `GetAttributeType` | `override Type GetAttributeType()` | Returns `typeof(TextAttribute)`. |