--- source_files: - Common/DTS.Common.Import/Parsers/ParseVariantBase.cs - Common/DTS.Common.Import/Parsers/DefaultParseImport.cs - Common/DTS.Common.Import/Parsers/DTSXMLParseImport.cs generated_at: "2026-04-17T16:35:09.352474+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "98d94de856736199" --- # Documentation: DTS.Common.Import Parsers ## 1. Purpose This module provides parsing infrastructure for importing data files into the DTS system. It defines an abstract base class `ParseVariantBase` for creating file-specific parsers, and two concrete implementations of `IParseImport` (`DefaultParseImport` and `DTSXMLParseImport`) that orchestrate the parsing process using processor classes. The module supports extensibility through injected parse variants and handles specialized XML import scenarios including hardware relationship linking. --- ## 2. Public Interface ### ParseVariantBase (Abstract Class) **Namespace:** `DTS.Common.Import.Parsers` **Implements:** `IParseVariant` | Member | Signature | Description | |--------|-----------|-------------| | `FileName` | `string { get; set; }` | Property to store the name of the file being parsed. | | `Parse` | `abstract void Parse(ref ImportObject importObject)` | Abstract method that derived classes must implement to perform parsing logic. Receives `ImportObject` by reference. | --- ### DefaultParseImport (Class) **Namespace:** `DTS.Common.Import.Parsers` **Implements:** `IParseImport` | Member | Signature | Description | |--------|-----------|-------------| | Constructor | `DefaultParseImport(ImportObject importObject, IEnumerable parseVariants)` | Initializes the parser with an import object and a collection of parse variants. | | `Parse` | `ImportObject Parse(IEnumerable importFiles)` | Orchestrates parsing by creating a `ParseProcessor` with the configured variants and files. Returns the processed `ImportObject`. | --- ### DTSXMLParseImport (Class) **Namespace:** `DTS.Common.Import` **Implements:** `IParseImport` | Member | Signature | Description | |--------|-----------|-------------| | Constructor | `DTSXMLParseImport(ImportObject importObject, IImportNotification importNotification, Func isCancelled = null, bool skipNormalizing = false)` | Initializes the XML parser with notification support, optional cancellation callback, and optional normalization skip. | | `UIItems` | `List { get; set; }` | Property for UI items, assigned to the internal `XMLParseProcessor` during parsing. | | `Parse`