Files

34 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- Common/DTS.CommonCore/Classes/ISO/IsoCode.cs
generated_at: "2026-04-17T16:38:36.632422+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2d494ff206708de3"
---
# Documentation: IsoCode Class
## 1. Purpose
The `IsoCode` class provides a structured representation of a 16-character ISO code, treating it as a composite identifier with distinct semantic segments. It exists to allow reading and modification of individual code components (such as location, dimension, and classification fields) without manual string manipulation. The class maintains a single internal character array and exposes each segment through typed string properties, handling padding and truncation automatically.
## 2. Public Interface
### Constructor
**`IsoCode(string isoCode)`**
- Initializes a new instance from a string input.
- If `null`, treats as empty string.
- If longer than 16 characters, truncates to first 16.
- If shorter than 16 characters, right-pads with `'?'`.
- Copies each character into the internal `_isoCodeFull` array.
### Properties
| Property | Type | Positions | Description |
|----------|------|-----------|-------------|
| `TestObject` | `string` | 0 | Single character. Getter returns 1-char string. Setter uses `'?'` if null/empty. |
| `Position` | `string` | 1 | Single character. Getter returns 1-char string. Setter uses `'?'` if null/empty. |
| `MainLocation` | `string` | 2-5 | Four characters. Pads with `'?'` if under 4 chars; truncates if over 4. |
| `FineLocation1` | `string` | 6-7 | Two characters. Pads with `'?'` if under 2 chars