This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
---
source_files:
- Common/DTS.Common.ISO/Properties/AssemblyInfo.cs
- Common/DTS.Common.ISO/Properties/Resources.Designer.cs
generated_at: "2026-04-16T03:29:22.576207+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "67d8506a4452cfae"
---
# Properties
## Documentation Page: `DTS.Common.ISO` Assembly (ISO Module)
---
### 1. **Purpose**
This module (`DTS.Common.ISO`) is a .NET class library assembly that provides shared infrastructure and resources for ISO-related functionality within the DTS (presumably *Data Transfer System* or domain-specific acronym) codebase. Based on the source files, its primary role is to define assembly metadata (e.g., versioning, COM visibility) and expose strongly-typed access to embedded UI resources—specifically, two bitmap images (`DTS_2C_Logo` and `DTS_2C_web_small`). It does not contain business logic or core functionality beyond resource management, suggesting it serves as a lightweight dependency for UI or presentation layers that require consistent branding or iconography.
---
### 2. **Public Interface**
The assembly exposes **no public types or methods** beyond the auto-generated `Resources` class. All public surface area is contained in the `DTS.Common.ISO.Properties.Resources` class:
- **`internal static class Resources`**
A strongly-typed resource class for accessing embedded resources (bitmaps).
- **`ResourceManager ResourceManager { get; }`**
Returns a cached `System.Resources.ResourceManager` instance used to look up resources by name. Initialized lazily on first access.
- **`CultureInfo Culture { get; set; }`**
Gets or sets the UI culture used for resource lookups. Allows overriding the current threads `CurrentUICulture` for resource resolution.
- **`Bitmap DTS_2C_Logo { get; }`**
Returns the embedded bitmap resource named `"DTS_2C_Logo"`. Throws `MissingManifestResourceException` if the resource is not found.
- **`Bitmap DTS_2C_web_small { get; }`**
Returns the embedded bitmap resource named `"DTS_2C_web_small"`. Throws `MissingManifestResourceException` if the resource is not found.
> **Note**: All members of `Resources` are `internal`, meaning they are only accessible within the same assembly (`DTS.Common.ISO`). No public types or methods are exposed to external consumers.
---
### 3. **Invariants**
- **Resource names are fixed and case-sensitive**: Resource lookups rely on exact string keys (`"DTS_2C_Logo"`, `"DTS_2C_web_small"`). Mismatches in casing or spelling will cause `ResourceManager.GetObject()` to return `null`, which is then cast to `Bitmap`, potentially causing `InvalidCastException` or `NullReferenceException` at runtime.
- **`ResourceManager` is lazily initialized and thread-safe for read access**: The `ResourceManager` property uses a null-check-and-assign pattern. While not explicitly synchronized, the .NET `ResourceManager` class is thread-safe for concurrent reads.
- **Assembly identity is static**: Version is fixed at `1.0.0.0` (both `AssemblyVersion` and `AssemblyFileVersion`). The `AssemblyCulture` is empty (indicating a neutral/satellite assembly not tied to a specific culture).
- **COM visibility is disabled**: `ComVisible(false)` ensures types in this assembly are not exposed to COM by default.
---
### 4. **Dependencies**
- **Dependencies *of* this assembly**:
- `System.Drawing` (for `System.Drawing.Bitmap`)
- `System.Resources` (for `ResourceManager`, `CultureInfo`)
- Core .NET runtime (`mscorlib`, `System`)
- **Dependencies *on* this assembly**:
- Not inferable from source alone. However, given the embedded resources (`DTS_2C_Logo`, `DTS_2C_web_small`), it is likely referenced by UI projects (e.g., WinForms, WPF, or reporting modules) that require consistent DTS branding assets.
---
### 5. **Gotchas**
- **No public API surface**: External consumers cannot directly use this assembly for functionality beyond resource access, and even resource access is limited to internal use (since `Resources` is `internal`). If external access is needed, the class must be made `public`.
- **Resource file mismatch risk**: The `Resources.Designer.cs` file references `"ISO.Properties.Resources"` as the base name for the `ResourceManager`. This assumes a corresponding `Resources.resx` file exists in the `Properties/` folder with matching embedded resources. If the `.resx` file is missing, renamed, or misconfigured, resource lookups will fail.
- **No localization logic**: While `Culture` can be set, the assembly itself does not define any localized strings or fallback logic. Only bitmaps are exposed, so culture changes affect only resource *lookup* (e.g., for satellite assemblies), not behavior.
- **Auto-generated code warning**: The `Resources.Designer.cs` header explicitly warns that manual edits will be lost on regeneration. Changes to resources must be made via `.resx` files and rebuilt.
- **No versioning strategy**: Fixed version `1.0.0.0` may cause issues if this assembly evolves independently. Consider aligning with semantic versioning or build-time version injection.
> **None identified from source alone** beyond the above—no complex logic, edge cases, or deprecated patterns are evident.

View File

@@ -0,0 +1,131 @@
---
source_files:
- Common/DTS.Common.ISO/Strings/StringResources.Designer.cs
generated_at: "2026-04-16T03:29:29.164879+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "f14833e08b2b143d"
---
# Documentation: `ISO.Strings.StringResources`
## 1. Purpose
This module provides a strongly-typed, auto-generated resource class (`StringResources`) for centralized retrieval of localized UI strings used throughout the ISO (likely *SLICE* or *DAS* — Device Access System) application suite. Its primary role is to decouple user-facing messages—particularly validation and device-detection error messages—from business logic—by storing them externally in `.resx` files and exposing them via compile-time-safe properties. This enables localization (e.g., multi-language support) and improves maintainability by avoiding hardcoded string literals.
## 2. Public Interface
The class is `internal`, but its members are used internally by the assembly. All members are static and accessed via property getters.
### `StringResources.ResourceManager` (property)
- **Type**: `System.Resources.ResourceManager`
- **Behavior**: Returns a cached `ResourceManager` instance initialized for the `"ISO.Strings.StringResources"` base name in the current assembly. Lazily initializes on first access.
### `StringResources.Culture` (property)
- **Type**: `System.Globalization.CultureInfo`
- **Behavior**: Gets or sets the UI culture override for all resource lookups via this class. Allows runtime switching of language (e.g., for testing or user preference).
### Device Serial Number Validation & Detection Messages
The following properties return localized strings used during device auto-detection (e.g., validating serial number prefixes). Each corresponds to a specific device type or validation rule:
| Property Name | Example Message Content | Purpose |
|---------------|-------------------------|---------|
| `AutoDetectDas_DIMShouldStartWithSPD` | `"SLICE PRO DIM serial numbers should start with 'SPD'."` | Validation error for DIM devices |
| `AutoDetectDas_DIRShouldStartWithDI` | `"DIR serial numbers should start with 'DI'."` | DIR device validation |
| `AutoDetectDas_DKRShouldStartWithDK` | `"DKR serial numbers should start with 'DK'."` | DKR device validation |
| `AutoDetectDas_G5ShouldStartWith5M` | `"TDAS G5 serial numbers should start with '5M'."` | TDAS G5 validation |
| `AutoDetectDAS_MICROBasePlusShouldStartWithBA0` | `"SLICE MICRO Base+ serial numbers should start with 'BA0'."` | MICRO Base+ validation |
| `AutoDetectDas_MicroSerialNumberShouldStartWithBA0` | `"SLICE MICRO serial numbers should start with 'BA0'."` | Standard MICRO validation |
| `AutoDetectDAS_NANOBasePlusShouldStartWithBA5` | `"SLICE NANO Base+ serial numbers should start with 'BA5'."` | NANO Base+ validation |
| `AutoDetectDas_PowerProShouldStartWithPPRO` | `"PowerPRO serial numbers should start with 'PPRO'."` | PowerPRO validation |
| `AutoDetectDas_SIMShouldStartWithSPS` | `"SLICE PRO SIM serial numbers should start with 'SPS'."` | SIM device validation |
| `AutoDetectDAS_SLDShouldStartWithSLD` | `"SLICE PRO Lab DIM serial numbers should start with 'SLD'."` | Lab DIM validation |
| `AutoDetectDAS_SliceECM` | `"SLICE PRO Ethernet Control Module serial numbers should start with 'SPE'."` | ECM validation |
| `AutoDetectDas_SliceG5ShouldStartWithSG5` | `"SLICE G5 serial numbers should start with 'SG5'."` | SLICE G5 validation |
| `AutoDetectDAS_SliceLabEthernetShouldStartWithSLE` | `"SLICE Lab Ethernet serial numbers should start with 'SLE'."` | Lab Ethernet validation |
| `AutoDetectDas_SLICENanoShouldStartWithBA5` | `"SLICE NANO serial numbers should start with 'BA5'."` | Standard NANO validation |
| `AutoDetectDAS_SLICEPRODBShouldStartWithSPDB` | `"SLICE PRO Distributor serial numbers should start with 'SPDB'."` | PRO Distributor validation |
| `AutoDetectDas_SliceSPM` | `"SLICE Mini Distributor serial numbers should start with 'SPM'."` | Mini Distributor validation |
| `AutoDetectDAS_SLSShouldStartWithSLS` | `"SLICE PRO Lab SIM serial numbers should start with 'SLS'."` | Lab SIM validation |
| `AutoDetectDAS_SLTShouldStartWithSLT` | `"SLICE PRO Lab TOM serial numbers should start with 'SLT'."` | Lab TOM validation |
| `AutoDetectDAS_TDASLabRackShouldStartWith` | `"TDAS PRO lab rack serial numbers should start with 'LR'."` | Lab rack validation |
| `AutoDetectDas_TDASRackShouldStartWith` | `"TDAS PRO rack serial numbers should start with 'DR'."` | Rack validation |
| `AutoDetectDas_TOMShouldStartWithSPT` | `"SLICE PRO TOM serial numbers should start with 'SPT'."` | TOM validation |
| `AutoDetectDas_TSRAIRShouldStartWithTA` | `"TSR AIR serial numbers should start with 'TA'."` | TSR AIR validation |
| `AutoDetectDas_SLICE6AIRBRShouldStartWith` | `"SLICE 6 AIR-BR serial numbers should start with 'S6BR'."` | SLICE 6 AIR-BR validation |
| `AutoDetectDas_SLICE6AIRShouldStartWith` | `"SLICE 6 AIR serial numbers should start with 'S6A'."` | SLICE 6 AIR validation |
| `AutoDetectDas_SLICE6DB3ShouldStartWith` | `"SLICE 6 distributor 3 serial numbers should start with S6DB3."` | SLICE 6 DB3 validation |
| `AutoDetectDas_Slice6DBShouldStartWithS6DB` | `"SLICE 6 distributor serial numbers should start with 'S6DB'."` | SLICE 6 Distributor validation |
| `AutoDetectDas_SLICE6ShouldStartWith` | `"SLICE 6 serial numbers should start with 'SL6'."` | SLICE 6 validation |
| `AutoDetectDas_SliceDBShouldStartWithSDB` | `"SLICE distributor serial numbers should start with 'SD'."` | Distributor validation |
| `AutoDetectDas_TypeShouldStartWithPrepend` | `"{0} serial numbers should start with '{1}'."` | Generic template for prefix validation messages (e.g., `string.Format(..., "SLICE PRO", "SPD")`) |
### Device Type Identification Messages
These properties return messages indicating which device type a given serial number was detected as:
| Property Name | Example Message Content | Purpose |
|---------------|-------------------------|---------|
| `AutoDetectDAS_SerialNumberBelongsToAG5` | `"Serial number belongs to a TDAS G5."` | TDAS G5 detection |
| `AutoDetectDAS_SerialNumberBelongsToAMicro` | `"Serial number belongs to a SLICE MICRO."` | SLICE MICRO detection |
| `AutoDetectDas_SerialNumberBelongsToANano` | `"Serial number belongs to a SLICE NANO."` | SLICE NANO detection |
| `AutoDetectDAS_SerialNumberBelongsToAPowerPRO` | `"Serial number belongs to a PowerPRO Battery."` | PowerPRO detection |
| `AutoDetectDas_SerialNumberBelongsToASLICEG5` | `"Serial number belongs to a SLICE G5."` | SLICE G5 detection |
| `AutoDetectDAS_SerialNumberBelongsToASLICEPROLabSIM` | `"Serial number belongs to a SLICE PRO Lab SIM."` | Lab SIM detection |
| `AutoDetectDAS_SerialNumberBelongsToASlicePROLabSLE` | `"Serial number belongs to a SLICE Lab Ethernet."` | Lab Ethernet detection |
| `AutoDetectDas_SerialNumberBelongsToASLICEProSim` | `"Serial number belongs to a SLICE PRO SIM."` | PRO SIM detection |
| `AutoDetectDAS_SerialNumberBelongsToATDASLabRack` | `"Serial number belongs to a TDAS PRO Lab rack."` | Lab rack detection |
| `AutoDetectDas_SerialNumberBelongsToATDASRack` | `"Serial number belongs to a TDAS PRO rack."` | Rack detection |
| `AutoDetectDAS_SLICE_SerialNumberBelongsToASLICELABDIM` | `"Serial number belongs to a SLICE PRO Lab DIM."` | Lab DIM detection |
| `AutoDetectDAS_SLICE_SerialNumberBelongsToASLICELABTOM` | `"Serial number belongs to a SLICE PRO Lab TOM."` | Lab TOM detection |
| `AutoDetectDas_SLICE_SerialNumberBelongsToASLICEProDIM` | `"Serial number belongs to a SLICE PRO DIM."` | PRO DIM detection |
### Required Field Validation Messages
| Property Name | Example Message Content | Purpose |
|---------------|-------------------------|---------|
| `AutoDetectDAS_IPAddressRequired` | `"IP address required."` | IP address field validation |
| `AutoDetectDAS_SerialNumberRequired` | `"Serial number required."` | Serial number field validation |
### Commit/Validation Failure Messages for Metadata Entities
| Property Name | Example Message Content | Purpose |
|---------------|-------------------------|---------|
| `CustomerDetails_FailedToCommit` | `"Failed to commit CustomerDetails."` | Error for saving customer metadata |
| `CustomerDetails_NullReferenceName` | `"CustomerDetail: Required name is null."` | Null-name validation for customer |
| `LabDetails_FailedToCommit` | `"Failed to commit LabDetails."` | Error for saving lab metadata |
| `LabDetails_NullReferenceName` | `"LabDetail: Required name is null."` | Null-name validation for lab |
| `TestEngineerDetails_FailedToCommit` | `"Failed to commit TestEngineerDetails."` | Error for saving test engineer metadata |
| `TestEngineerDetails_NullReferenceName` | `"TestEngineerDetail: Required name is null."` | Null-name validation for test engineer |
> **Note**: All message properties are read-only; they only expose string values via `ResourceManager.GetString(...)`. No methods or constructors are public.
## 3. Invariants
- **Thread-safety**: The `ResourceManager` instance is lazily initialized and stored in a static field. While the getter checks for `null`, there is no explicit locking—reliance is on .NETs `ResourceManager` thread-safety guarantees (which are documented as safe for concurrent reads, but not guaranteed for concurrent *initialization* in older frameworks; however, the code uses `object.ReferenceEquals` and does not reassign after initialization, so it is effectively safe for read-only use).
- **Localization scope**: All strings are retrieved using the current `Culture` (if set) or the current UI culture. No fallback logic is implemented in this class—it delegates entirely to `ResourceManager`.
- **No mutation**: The class itself is immutable at runtime. String values are retrieved on-demand from the underlying resource store and not cached per-property (only the `ResourceManager` is cached).
- **Auto-generation constraint**: As indicated by the `<auto-generated>` header, manual edits to this file will be overwritten. All string keys and properties are derived from the corresponding `.resx` file.
## 4. Dependencies
### This module depends on:
- `System.Resources.ResourceManager` (mscorlib)
- `System.Globalization.CultureInfo` (mscorlib)
- `System.CodeDom.Compiler`, `System.Diagnostics`, `System.Runtime.CompilerServices`, `System.ComponentModel` (various core assemblies)
### This module is depended upon by:
- Any code in the `ISO` namespace (or referencing this assembly) that needs localized strings—especially UI layers (e.g., WPF/WinForms), validation logic, or device detection routines.
- Likely consumers include:
- Device auto-detection modules (e.g., `AutoDetectDAS` logic)
- Forms or view models that display error messages (e.g., `CustomerDetails`, `LabDetails`, `TestEngineerDetails` classes)
- Validation utilities that check serial number prefixes or required fields
## 5. Gotchas
- **No runtime error handling**: If a resource key is missing from the `.resx` file, `ResourceManager.GetString(...)` returns `null`. Callers must handle or guard against null returns (not visible in this file).
- **Culture override is global**: Setting `StringResources.Culture` affects *all* subsequent lookups in the AppDomain via this class—potentially causing race conditions in multi-threaded UI scenarios if not synchronized.
- **Hardcoded key names**: The property names (e.g., `AutoDetectDas_DIMShouldStartWithSPD`) are tightly coupled to the `.resx` key names. Renaming keys in the `.resx` without regenerating this file will break consumers.
- **No localization for generic template**: While `AutoDetectDas_TypeShouldStartWithPrepend` is a format string (`"{0} serial numbers should start with '{1}'."`), callers must manually apply `string.Format`—the class does not provide a helper method for this.
- **No documentation of `.resx` file location or build process**: The source `.resx` file(s) are not included here, so the full set of keys and their current values (beyond whats exposed in properties) cannot be verified from this file alone.
None identified beyond the above.