58 lines
3.5 KiB
Markdown
58 lines
3.5 KiB
Markdown
---
|
|
source_files:
|
|
- DataPRO/Modules/SystemSettings/ISOSettings/ISOSettingsModule.cs
|
|
generated_at: "2026-04-17T16:30:25.201419+00:00"
|
|
model: "zai-org/GLM-5-FP8"
|
|
schema_version: 1
|
|
sha256: "7783de7681880eb0"
|
|
---
|
|
|
|
# ISOSettings
|
|
|
|
### Purpose
|
|
This module provides ISO Settings functionality within the DTS application framework. It is a Prism module responsible for registering its associated View and ViewModel with the Unity dependency injection container, enabling the application to display and manage ISO-related configuration settings. The module also exposes metadata (image, name, group) for display on the main screen as an available component.
|
|
|
|
### Public Interface
|
|
|
|
**ISOSettingsModule**
|
|
- `ISOSettingsModule(IUnityContainer unityContainer)` — Constructor that receives the Unity container via dependency injection.
|
|
- `void Initialize()` — Registers `IISOSettingsView` to `ISOSettingsView` and `IISOSettingsViewModel` to `ISOSettingsViewModel` with the Unity container.
|
|
- `void OnInitialized(IContainerProvider containerProvider)` — Empty implementation; no initialization logic executed.
|
|
- `void RegisterTypes(IContainerRegistry containerRegistry)` — Calls `Initialize()` to perform type registrations.
|
|
|
|
**ISOSettingsImageAttribute**
|
|
- `ISOSettingsImageAttribute()` — Default constructor.
|
|
- `ISOSettingsImageAttribute(string s)` — Constructor accepting a string parameter (unused).
|
|
- `override eAssemblyRegion AssemblyRegion` — Throws `NotImplementedException`.
|
|
- `override BitmapImage AssemblyImage` — Returns the image retrieved via `AssemblyInfo.GetImage(AssemblyNames.IsoSettings.ToString())`.
|
|
- `override string AssemblyName` — Returns `AssemblyNames.IsoSettings.ToString()`.
|
|
- `override string AssemblyGroup` — Returns `eAssemblyGroups.Administrative.ToString()`.
|
|
- `override Type GetAttributeType()` — Returns `typeof(ImageAttribute)`.
|
|
- `override BitmapImage GetAssemblyImage()` — Returns `AssemblyImage`.
|
|
- `override string GetAssemblyName()` — Returns `AssemblyName`.
|
|
- `override eAssemblyRegion GetAssemblyRegion()` — Throws `NotImplementedException`.
|
|
- `override string GetAssemblyGroup()` — Returns `AssemblyGroup`.
|
|
|
|
### Invariants
|
|
- The module must be instantiated with a non-null `IUnityContainer` reference.
|
|
- View and ViewModel types are registered as transient (not singleton) via `RegisterType`.
|
|
- `ISOSettingsImageAttribute` is decorated with `[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]`, ensuring only one instance per assembly.
|
|
|
|
### Dependencies
|
|
**Depends on:**
|
|
- `DTS.Common` — Provides `AssemblyInfo`, `AssemblyNames`, `eAssemblyGroups`.
|
|
- `DTS.Common.Interface` — Provides `ImageAttribute`, `eAssemblyRegion`, `IISOSettingsView`, `IISOSettingsViewModel` (inferred).
|
|
- `Prism.Ioc` — Provides `IContainerProvider`, `IContainerRegistry`.
|
|
- `Prism.Modularity` — Provides `IModule`, `ModuleAttribute`.
|
|
- `Unity` — Provides `IUnityContainer`.
|
|
- `System.ComponentModel.Composition` — Provides `ExportAttribute`.
|
|
- `System.Windows.Media.Imaging` — Provides `BitmapImage`.
|
|
|
|
**Depended on by:** Not determinable from source alone.
|
|
|
|
### Gotchas
|
|
- `AssemblyRegion` property and `GetAssemblyRegion()` method throw `NotImplementedException`. Calling these will crash the application.
|
|
- The `ISOSettingsImageAttribute(string s)` constructor ignores its string parameter; it retrieves the image identically to the default constructor.
|
|
- `OnInitialized` is empty, which may indicate incomplete initialization logic or intentional deferral to `RegisterTypes`.
|
|
|
|
--- |