98 lines
4.8 KiB
Markdown
98 lines
4.8 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.Common.Import/ImportOptions/EqxImportOptions.cs
|
||
|
|
- Common/DTS.Common.Import/ImportOptions/CsvImportOptions.cs
|
||
|
|
generated_at: "2026-04-16T11:43:37.257209+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "c231715b4e36a96d"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: DTS.Common.Import.ImportOptions
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module provides configuration option classes for data import operations within the DTS system. It defines three option classes—`EqxImportOptions`, `CsvImportOptions`, and `ZeroMethodOptions`—that encapsulate import behavior settings for EQX-format sensor imports, CSV file parsing, and zero method calibration configuration respectively. These classes serve as data transfer objects to parameterize import operations.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### Class: `EqxImportOptions`
|
||
|
|
|
||
|
|
**Namespace:** `DTS.Common.Import.ImportOptions`
|
||
|
|
|
||
|
|
Configuration options for EQX import operations.
|
||
|
|
|
||
|
|
| Property | Type | Default | Description |
|
||
|
|
|----------|------|---------|-------------|
|
||
|
|
| `OverwriteExistingSensors` | `bool` | `true` | Controls whether existing sensors should be overwritten during import. |
|
||
|
|
| `ImportSensorModels` | `bool` | `true` | Controls whether sensor models should be imported. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### Class: `CsvImportOptions`
|
||
|
|
|
||
|
|
**Namespace:** `DTS.Common.Import.ImportOptions`
|
||
|
|
|
||
|
|
Configuration options for CSV file parsing and import.
|
||
|
|
|
||
|
|
| Property | Type | Default | Description |
|
||
|
|
|----------|------|---------|-------------|
|
||
|
|
| `Encoding` | `string` | None (uninitialized) | Specifies the character encoding for the CSV file. |
|
||
|
|
| `FieldSeparator` | `string` | None (uninitialized) | Specifies the field delimiter character(s) used in the CSV. |
|
||
|
|
| `ImportCulture` | `CultureInfo` | None (uninitialized) | Specifies the culture settings for parsing culture-dependent data (e.g., number formats, dates). |
|
||
|
|
| `StripBackSlash` | `bool` | None (uninitialized) | Controls whether backslash characters should be removed during import. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### Class: `ZeroMethodOptions`
|
||
|
|
|
||
|
|
**Namespace:** `DTS.Common.Import.ImportOptions`
|
||
|
|
|
||
|
|
Configuration options for zero method calibration settings.
|
||
|
|
|
||
|
|
| Property | Type | Default | Description |
|
||
|
|
|----------|------|---------|-------------|
|
||
|
|
| `ZeroMethodType` | `ZeroMethodType` | None (uninitialized) | Specifies the type of zero method to apply. Type is defined in `DTS.Common.Enums.Sensors`. |
|
||
|
|
| `ZeroMethodStart` | `double` | None (uninitialized) | Specifies the start value for the zero method range. |
|
||
|
|
| `ZeroMethodEnd` | `double` | None (uninitialized) | Specifies the end value for the zero method range. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Invariants
|
||
|
|
|
||
|
|
**Explicit invariants from source:** None. The classes contain only auto-implemented properties with no validation logic, constructors, or constraints visible in the source.
|
||
|
|
|
||
|
|
**Observations:**
|
||
|
|
- `EqxImportOptions` properties have explicit default values of `true`.
|
||
|
|
- `CsvImportOptions` and `ZeroMethodOptions` properties have no default values; consumers must initialize them.
|
||
|
|
- No nullability annotations are present; reference type properties (`Encoding`, `FieldSeparator`, `ImportCulture`) may be null at runtime if not explicitly set.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. Dependencies
|
||
|
|
|
||
|
|
### This module depends on:
|
||
|
|
- `System` (core .NET types)
|
||
|
|
- `System.Collections.Generic` (generic collections)
|
||
|
|
- `System.Globalization` (`CultureInfo` type used in `CsvImportOptions`)
|
||
|
|
- `System.Linq` (LINQ support)
|
||
|
|
- `System.Text` (text encoding support)
|
||
|
|
- `System.Threading.Tasks` (async/task support)
|
||
|
|
- `DTS.Common.Enums.Sensors` (`ZeroMethodType` enum used in `ZeroMethodOptions`)
|
||
|
|
|
||
|
|
### Consumers:
|
||
|
|
Not determinable from the provided source files alone. These option classes are likely consumed by import service classes or handlers elsewhere in the `DTS.Common.Import` namespace or broader DTS system.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 5. Gotchas
|
||
|
|
|
||
|
|
1. **`Encoding` is a `string`, not `System.Text.Encoding`:** The `CsvImportOptions.Encoding` property is declared as `string`, not the `System.Text.Encoding` type. Consumers must convert between string representations and actual encoding objects.
|
||
|
|
|
||
|
|
2. **Inconsistent default value patterns:** `EqxImportOptions` initializes both properties to `true`, while `CsvImportOptions` and `ZeroMethodOptions` leave all properties uninitialized. This inconsistency may lead to unexpected `null` or default value behavior if consumers assume all option classes follow the same initialization pattern.
|
||
|
|
|
||
|
|
3. **Unused imports:** Both files import `System.Collections.Generic`, `System.Linq`, `System.Text`, and `System.Threading.Tasks`, but none of these namespaces are referenced in the visible code. This may indicate legacy code or generated boilerplate.
|
||
|
|
|
||
|
|
4. **No validation or bounds checking:** `ZeroMethodOptions.ZeroMethodStart` and `ZeroMethodEnd` are raw `double` values with no validation. The relationship between start and end (e.g., whether start must be less than end) is not enforced at this level.
|