Files
Marc Schier eeb58c2fa6 Enhance enum definition handling and validation (#3124)
* Enhance enum definition handling and validation

Added a `string enumTypeName` parameter to the `ToEnumDefinition` methods in `ComplexTypeSystem.cs` and `DataTypeDefinitionExtension.cs` to improve enum field name generation, especially when original names are null or empty. Implemented a fallback mechanism to ensure robust naming.

In `ComplexTypeBuilder.cs`, added null checks for `typeName` to prevent runtime errors and ensure valid type definitions. Updated logic for defining enum literals to handle empty field names, ensuring unique names are generated based on `typeName` and enum value.

* Update Libraries/Opc.Ua.Client.ComplexTypes/TypeBuilder/ComplexTypeBuilder.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Libraries/Opc.Ua.Client.ComplexTypes/DataTypeDefinitionExtension.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix issue from code review

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-24 21:16:06 +02:00
..
2025-03-07 15:25:33 +02:00