mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-20 08:41:51 +08:00
eeb58c2fa6
* 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>