iTwin / imodel-native

Apache License 2.0
20 stars 12 forks source link

Do not search for the class from the pruned schema #840

Closed akshay05n closed 4 weeks ago

ColinKerr commented 1 month ago

Overall this change seems wrong to me. CustomAttributeInstanceReadContext already checks to see if the schema is pruned but it doesn't communicate this information back out to the deserialization code so it doesn't know how to handle it.

I think you could find some way to wiggle some better status information out from the _FindSchemaCP method to the InstanceXmlReader.GetInstance method. That way you would only have to parse the schema name and scan the pruned schema list once per CA instead of twice. Haven't thought through the right way to do it but it seems possible with some refactoring.