Commit 83d5c3d
committed
Restrict topic reference lookups to classes
Currently, any call to `GetValue()` that doesn't match the other conditions—i.e., isn't a compatible or convertible property, isn't a list, and isn't `[MapToParent]`—is evaluated to determine if it's a topic reference. In practice, most properties that aren't topic references will have fallen into one of the other conditions. Nevertheless, as the lookups required for topic references are a bit expensive, we can further optimize this by specifying that the property type must be a class (i.e., not an interface and not a value object). That's consistent with what we expect topic references to be mapped to.
In practice, this will typically relate to potential properties that are non-compatible value properties. These are likely rare scenarios as they won't get mapped, and should probably be decorated with `[DisableMapping]`. Still, it's a fast check for refining the condition.1 parent 0539c8d commit 83d5c3d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
| 544 | + | |
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| |||
0 commit comments