When the value of a parameter is null, the NestedElementTreeGenerator breaks
justineatrhea opened this issue · 0 comments
Prerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of the COMET-SDK
- I have searched open and closed issues to ensure it has not already been reported
Description
When a value of a parameter is null instead of as default ("-"), the NestedElementTreeGenerator breaks :
Unhandled exception rendering component: ArgumentOutOfRange_Index Arg_ParamName_Name, index System.ArgumentOutOfRangeException: ArgumentOutOfRange_Index Arg_ParamName_Name, index at System.Collections.Generic.List
1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_Item(Int32 )
at CDP4Common.Types.ValueArray1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_Item(Int32 index) at CDP4Common.Helpers.NestedElementTreeGenerator.CreatedNestedParameter(ParameterOrOverrideBase parameter, ParameterTypeComponent component, ParameterValueSetBase valueSet, Option option) at CDP4Common.Helpers.NestedElementTreeGenerator.CreateNestedParameters(ElementUsage elementUsage, DomainOfExpertise domainOfExpertise, Option option)+MoveNext() at CDP4Common.Helpers.NestedElementTreeGenerator.RecursivelyCreateNestedElements(ElementDefinition elementDefinition, ElementDefinition rootElement, DomainOfExpertise domainOfExpertise, List
1 elementUsages, Option option, Boolean updateOption)+MoveNext()
at System.Collections.Generic.List1[[CDP4Common.EngineeringModelData.NestedElement, CDP4Common, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]].InsertRange(Int32 , IEnumerable
1 )
at System.Collections.Generic.List1[[CDP4Common.EngineeringModelData.NestedElement, CDP4Common, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]].AddRange(IEnumerable
1 )
at CDP4Common.Helpers.NestedElementTreeGenerator.GenerateNestedElements_Impl(Option option, DomainOfExpertise domainOfExpertise, ElementDefinition rootElement, Boolean updateOption)
at CDP4Common.Helpers.NestedElementTreeGenerator.Generate_Impl(Option option, DomainOfExpertise domainOfExpertise, Boolean updateOption)
at CDP4Common.Helpers.NestedElementTreeGenerator.Generate(Option option, Boolean updateOption)`
Steps to Reproduce
- Put a value of a parameter as null instead of as default
- Generate Nested Elements with NestedElementTreeGenerator
System Configuration
- COMET version:
- CDP4ServicesDal: 8.1.0